[PATCH] D114382: [clang] Fix wrong -Wunused-local-typedef warning within a template function

Richard Trieu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 1 02:15:20 PST 2021


rtrieu added inline comments.


================
Comment at: clang/test/Modules/odr_hash.cpp:4288
 S<X> s;
+// expected-error at first.h:* {{'ParameterTest::S::Foo' has different definitions in different modules; definition in module 'FirstModule' first difference is 1st parameter with name 'aaaa'}}
+// expected-note at second.h:* {{but in 'SecondModule' found 1st parameter with name 'asdf'}}
----------------
krisb wrote:
> I'm not sure what was the original intent of this test (i.e. whether it intentionally tests the fact that there is no error on an uninstantiated static member function). As well as it doesn't clear to me what is the role of the unused typedef here, but it starts triggering the error because of redecls() call on isReferenced() added by this patch.
I've checked out the ODR Hashing versus the other cases.   The new error is in line with the other behavior.  Having this new error is okay.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114382



More information about the cfe-commits mailing list