Index: docs/LibASTMatchersReference.html =================================================================== --- docs/LibASTMatchersReference.html +++ docs/LibASTMatchersReference.html @@ -2758,6 +2758,29 @@ +Matcher<Expr>isTypeDependent +
Matches expressions that are type-dependant because the template type
+is not yet instantiated.
+
+For example, the expressions "x" and "x + y" are type-dependent in
+the following code, but "y" is not type-dependent:
+  template<typename T>
+  void add(T x, int y) {
+    x + y;
+  }
+
+ + +Matcher<Expr>isValueDependent +
Matches expression that are value-dependant because they contain a
+non-type template parameter.
+
+For example, the array bound of "Chars" in the following example is
+value-dependent.
+  template<int Size, char (&Chars)[Size]> struct meta_string;
+
+ + Matcher<FieldDecl>hasBitWidthunsigned Width
Matches non-static data members that are bit-fields of the specified
 bit width.
Index: include/clang/ASTMatchers/ASTMatchers.h
===================================================================
--- include/clang/ASTMatchers/ASTMatchers.h
+++ include/clang/ASTMatchers/ASTMatchers.h
@@ -774,6 +774,29 @@
   return InnerMatcher.matches(*Node.IgnoreParenCasts(), Finder, Builder);
 }
 
+/// Matches expressions that are type-dependant because the template type
+/// is not yet instantiated.
+///
+/// For example, the expressions "x" and "x + y" are type-dependent in
+/// the following code, but "y" is not type-dependent:
+/// \code
+///   template
+///   void add(T x, int y) {
+///     x + y;
+///   }
+/// \endcode
+AST_MATCHER(Expr, isTypeDependent) { return Node.isTypeDependent(); }
+
+/// Matches expression that are value-dependant because they contain a
+/// non-type template parameter.
+///
+/// For example, the array bound of "Chars" in the following example is
+/// value-dependent.
+/// \code
+///   template struct meta_string;
+/// \endcode
+AST_MATCHER(Expr, isValueDependent) { return Node.isValueDependent(); }
+
 /// Matches expressions that match InnerMatcher after implicit casts and
 /// parentheses are stripped off.
 ///