[PATCH] D48717: [clang-tidy] fix PR36489 - respect deduced pointer types from auto as well

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 28 06:58:49 PDT 2018


aaron.ballman requested changes to this revision.
aaron.ballman added inline comments.
This revision now requires changes to proceed.


================
Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic-pr36489.cpp:4
+
+// Fix PR36489 and detect auto-deduced value correctly.
+char *getPtr();
----------------
Can this also include tests for other deduced types, like `decltype(expr)` and `decltype(auto)`?


================
Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp:88
 
-  for(int ii : a) ; // OK, pointer arithmetic generated by compiler
+  for (int ii : a) ; // OK, pointer arithmetic generated by compiler
 }
----------------
Spurious whitespace change.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D48717





More information about the cfe-commits mailing list