================
@@ -487,6 +487,15 @@ decltype(COMMAND_LINE_INT{}) h21();
// CHECK-MESSAGES: :[[@LINE-1]]:30: warning: use a trailing return type for
this function [modernize-use-trailing-return-type]
// CHECK-FIXES: auto h21() -> decltype(COMMAND_LINE_INT{});
+// Builtin macros like __has_feature are registered as object-like macros but
+// require function-like syntax when expanded. Ensure the check does not cause
+// spurious "missing '(' after '__has_feature'" errors when they appear in the
+// raw lex span of a function return type.
+const decltype(__has_feature(cxx_constexpr)) h22();
+// CHECK-MESSAGES: :[[@LINE-1]]:46: warning: use a trailing return type for
this function [modernize-use-trailing-return-type]
+const decltype(__has_builtin(__builtin_expect)) h23();
+// CHECK-MESSAGES: :[[@LINE-1]]:49: warning: use a trailing return type for
this function [modernize-use-trailing-return-type]
----------------
unterumarmung wrote:
Add `CHECK-FIXES`?
https://github.com/llvm/llvm-project/pull/184022
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits