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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 7 05:03:32 PDT 2016


aaron.ballman marked an inline comment as done.

================
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 *'
+
----------------
hokein wrote:
> 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;`.
Yes, it will, but I should add a test case for it just the same.


http://reviews.llvm.org/D21036





More information about the cfe-commits mailing list