[PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 8 04:55:39 PST 2016


alexfh added inline comments.

================
Comment at: test/clang-tidy/misc-definitions-in-headers.hpp:5
@@ +4,3 @@
+// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: function 'f' defined in a header file; function definitions in header files can lead to ODR violations
+// CHECK-FIXES: inline int f() {
+  return 1;
----------------
Now please address the "including the check name" part and I'm happy ;)


http://reviews.llvm.org/D15710





More information about the cfe-commits mailing list