[PATCH] D102689: [C++] Ignore top-level qualifiers in casts

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 9 04:33:01 PDT 2021


Anastasia added inline comments.


================
Comment at: clang/test/SemaCXX/warn-reinterpret-base-class.cpp:301
 
-  // expected-warning at +2 {{'reinterpret_cast' to class 'L' (aka 'const F *volatile') from its base at non-zero offset 'E *' behaves differently from 'static_cast'}}
+  // expected-warning at +2 {{'reinterpret_cast' to class 'K' (aka 'const F *') from its base at non-zero offset 'E *' behaves differently from 'static_cast'}}
   // expected-note at +1 {{use 'static_cast' to adjust the pointer correctly while downcasting}}
----------------
I wonder if there is a way to track the original type for the diagnostic? Or maybe it is intuitive enough considering the quoted spec wording...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102689/new/

https://reviews.llvm.org/D102689



More information about the cfe-commits mailing list