================
@@ -709,7 +709,8 @@ AST_MATCHER(FieldDecl, isBitField) {
 /// fieldDecl(hasBitWidth(2))
 ///   matches 'int a;' and 'int c;' but not 'int b;'.
 AST_MATCHER_P(FieldDecl, hasBitWidth, unsigned, Width) {
-  return Node.isBitField() && Node.getBitWidthValue() == Width;
+  return Node.isBitField() && Node.hasConstantIntegerBitWidth() &&
----------------
shafik wrote:

It looks like you are only testing the `Node.hasConstantIntegerBitWidth() == 
true` case in the test below. If that is correct we should add a test that 
covers both cases and any other combinations of these conditions not covered by 
testing.

https://github.com/llvm/llvm-project/pull/148692
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to