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

Kristina Bessonova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 22 10:33:53 PST 2021


krisb 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'}}
----------------
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.


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