[PATCH] D21036: Misplaced const-qualification with typedef types

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 7 02:32:17 PDT 2016


hokein added inline comments.

================
Comment at: test/clang-tidy/misc-misplaced-const.c:17
@@ +16,3 @@
+  const ip i3 = 0;
+  // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: 'i3' declared with a const-qualified typedef type; results in the type being 'int *const' instead of 'const int *'
+
----------------
Will the check show the warning on `ip const i3 = 0;`? Technically, `const ip i3 = 0` is exactly the same with `ip const i3 = 0;`.


http://reviews.llvm.org/D21036





More information about the cfe-commits mailing list