Update clang-stable to r498229.

Test: N/A
Bug: http://b/280683256
Change-Id: Ic82d9a94230f9c6a00cdc35922d9913613c2f2d8
diff --git a/clang-stable/README.md b/clang-stable/README.md
index 2af3aca..6bc5206 100644
--- a/clang-stable/README.md
+++ b/clang-stable/README.md
@@ -1 +1 @@
-All contents in clang-stable are copies of clang-r487747c.
\ No newline at end of file
+All contents in clang-stable are copies of clang-r498229.
\ No newline at end of file
diff --git a/clang-stable/bin/clang-format b/clang-stable/bin/clang-format
index 672c23e..28c0020 100755
--- a/clang-stable/bin/clang-format
+++ b/clang-stable/bin/clang-format
Binary files differ
diff --git a/clang-stable/bin/git-clang-format b/clang-stable/bin/git-clang-format
index 054978c..695545d 100755
--- a/clang-stable/bin/git-clang-format
+++ b/clang-stable/bin/git-clang-format
@@ -347,7 +347,7 @@
     line = convert_string(line)
     match = re.search(r'^\+\+\+\ [^/]+/(.*)', line)
     if match:
-      filename = match.group(1).rstrip('\r\n')
+      filename = match.group(1).rstrip('\r\n\t')
     match = re.search(r'^@@ -[0-9,]+ \+(\d+)(,(\d+))?', line)
     if match:
       start_line = int(match.group(1))
diff --git a/clang-stable/lib/libclang.so b/clang-stable/lib/libclang.so
index a96d7a8..a5de420 100644
--- a/clang-stable/lib/libclang.so
+++ b/clang-stable/lib/libclang.so
Binary files differ
diff --git a/clang-stable/lib/python3/site-packages/clang/cindex.py b/clang-stable/lib/python3/site-packages/clang/cindex.py
index 2e32ce2..6d33650 100644
--- a/clang-stable/lib/python3/site-packages/clang/cindex.py
+++ b/clang-stable/lib/python3/site-packages/clang/cindex.py
@@ -286,6 +286,11 @@
         """Get the file offset represented by this source location."""
         return self._get_instantiation()[3]
 
+    @property
+    def is_in_system_header(self):
+        """Returns true if the given source location is in a system header."""
+        return conf.lib.clang_Location_isInSystemHeader(self)
+
     def __eq__(self, other):
         return conf.lib.clang_equalLocations(self, other)
 
@@ -1529,6 +1534,51 @@
         """
         return conf.lib.clang_CXXMethod_isMoveAssignmentOperator(self)
 
+    def is_explicit_method(self):
+        """Determines if a C++ constructor or conversion function is
+        explicit, returning 1 if such is the case and 0 otherwise.
+
+        Constructors or conversion functions are declared explicit through
+        the use of the explicit specifier.
+
+        For example, the following constructor and conversion function are
+        not explicit as they lack the explicit specifier:
+
+            class Foo {
+                Foo();
+                operator int();
+            };
+
+        While the following constructor and conversion function are
+        explicit as they are declared with the explicit specifier.
+
+            class Foo {
+                explicit Foo();
+                explicit operator int();
+            };
+
+        This method will return 0 when given a cursor pointing to one of
+        the former declarations and it will return 1 for a cursor pointing
+        to the latter declarations.
+
+        The explicit specifier allows the user to specify a
+        conditional compile-time expression whose value decides
+        whether the marked element is explicit or not.
+
+        For example:
+
+            constexpr bool foo(int i) { return i % 2 == 0; }
+
+            class Foo {
+                 explicit(foo(1)) Foo();
+                 explicit(foo(2)) operator int();
+            }
+
+        This method will return 0 for the constructor and 1 for
+        the conversion function.
+        """
+        return conf.lib.clang_CXXMethod_isExplicit(self)
+
     def is_mutable_field(self):
         """Returns True if the cursor refers to a C++ field that is declared
         'mutable'.
@@ -3494,6 +3544,10 @@
    [Cursor],
    bool),
 
+  ("clang_CXXMethod_isExplicit",
+   [Cursor],
+   bool),
+
   ("clang_CXXMethod_isPureVirtual",
    [Cursor],
    bool),
@@ -4082,6 +4136,10 @@
    [Cursor],
    c_longlong),
 
+  ("clang_Location_isInSystemHeader",
+   [SourceLocation],
+   bool),
+
   ("clang_Type_getAlignOf",
    [Type],
    c_longlong),
diff --git a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.a b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.a
index fba3134..55075dc 100644
--- a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.a
+++ b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.a
Binary files differ
diff --git a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so
deleted file mode 120000
index 7515e92..0000000
--- a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so
+++ /dev/null
@@ -1 +0,0 @@
-libc++.so.1
\ No newline at end of file
diff --git a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so
new file mode 100644
index 0000000..c2d18b5
--- /dev/null
+++ b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so
Binary files differ
diff --git a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so.1 b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so.1
deleted file mode 100644
index ec3bce8..0000000
--- a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so.1
+++ /dev/null
Binary files differ
diff --git a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so.1 b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so.1
new file mode 120000
index 0000000..fd38fe5
--- /dev/null
+++ b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++.so.1
@@ -0,0 +1 @@
+libc++.so
\ No newline at end of file
diff --git a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.a b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.a
index c95107f..b6d32a5 100644
--- a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.a
+++ b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.a
Binary files differ
diff --git a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.so b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.so
new file mode 100644
index 0000000..5ca4e96
--- /dev/null
+++ b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.so
Binary files differ
diff --git a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.so.1 b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.so.1
deleted file mode 100644
index 0d91cec..0000000
--- a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.so.1
+++ /dev/null
Binary files differ
diff --git a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.so.1 b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.so.1
new file mode 120000
index 0000000..45f91b2
--- /dev/null
+++ b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++abi.so.1
@@ -0,0 +1 @@
+libc++abi.so
\ No newline at end of file
diff --git a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++experimental.a b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++experimental.a
index 7a52aba..df3327e 100644
--- a/clang-stable/lib/x86_64-unknown-linux-gnu/libc++experimental.a
+++ b/clang-stable/lib/x86_64-unknown-linux-gnu/libc++experimental.a
Binary files differ
diff --git a/clang-stable/share/clang/clang-format-diff.py b/clang-stable/share/clang/clang-format-diff.py
index 1f6ff0f..1dcc868 100755
--- a/clang-stable/share/clang/clang-format-diff.py
+++ b/clang-stable/share/clang/clang-format-diff.py
@@ -84,12 +84,19 @@
       if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE):
         continue
 
-    match = re.search(r'^@@.*\+(\d+)(,(\d+))?', line)
+    match = re.search(r'^@@.*\+(\d+)(?:,(\d+))?', line)
     if match:
       start_line = int(match.group(1))
       line_count = 1
-      if match.group(3):
-        line_count = int(match.group(3))
+      if match.group(2):
+        line_count = int(match.group(2))
+        # The input is something like
+        #
+        # @@ -1, +0,0 @@
+        #
+        # which means no lines were added.
+        if line_count == 0:
+          continue
       # Also format lines range if line_count is 0 in case of deleting
       # surrounding statements.
       end_line = start_line
diff --git a/clang-stable/share/clang/clang-format.el b/clang-stable/share/clang/clang-format.el
index 4e6daa8..30ac750 100644
--- a/clang-stable/share/clang/clang-format.el
+++ b/clang-stable/share/clang/clang-format.el
@@ -82,7 +82,7 @@
         (let* ((children (xml-node-children node))
                (text (car children)))
           (cl-case (xml-node-name node)
-            ('replacement
+            (replacement
              (let* ((offset (xml-get-attribute-or-nil node 'offset))
                     (length (xml-get-attribute-or-nil node 'length)))
                (when (or (null offset) (null length))
@@ -93,7 +93,7 @@
                (setq offset (string-to-number offset))
                (setq length (string-to-number length))
                (push (list offset length text) replacements)))
-            ('cursor
+            (cursor
              (setq cursor (string-to-number text)))))))
 
     ;; Sort by decreasing offset, length.