================
@@ -0,0 +1,23 @@
+// RUN: %check_clang_tidy %s readability-identifier-naming %t -- \
+// RUN:   -config='{CheckOptions: { \
+// RUN:     readability-identifier-naming.FunctionCase: camelBack, \
+// RUN:     readability-identifier-naming.ParameterCase: camelBack, \
+// RUN:     readability-identifier-naming.VariableCase: camelBack \
+// RUN:   }}'
+
+#define WRAP(E) E
+
+WRAP(int foo(int v) { return v; })
+
+void testLambdaInMacroArgument() {
+  WRAP([](int var) {
+    return var;
+  }(1));
+}
+
+int badFunction(int BadParam) {
+  // CHECK-MESSAGES: :[[@LINE-1]]:21: warning: invalid case style for 
parameter 'BadParam' [readability-identifier-naming]
----------------
savchart wrote:

The behavior is indeed as you described. I tried to reduce this to a regression 
test, but it turned out to be less straightforward than I expected, so I need a 
bit more time to investigate the proper test setup.

The reproduction is: root .clang-tidy uses CamelCase, subdir/.clang-tidy uses 
camelBack. For a normal declaration in subdir, clang-tidy picks the subdir 
style, but for a declaration coming from a macro argument it appears to use the 
root style instead.

https://github.com/llvm/llvm-project/pull/206809
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to