================
@@ -182,6 +233,15 @@ bool BugSuppression::isSuppressed(const 
PathDiagnosticLocation &Location,
     // declaration that isn't TranslationUnitDecl, because we should respect
     // attributes on the entire declaration chain.
     while (true) {
+
+      // Template specializations (e.g., Wrapper<int>) should inherit
+      // suppression attributes from their primary template or partial
+      // specialization. Transform specializations to their template 
definitions
+      // before checking for suppressions or walking up the lexical parent
+      // chain.
----------------
ziqingluo-90 wrote:

So far my understanding is:
- Template specialization is fine--it does inherit suppression attributes 
(according to the printed AST).
- The reason that we need this fix is that `getLexicalDeclContext` is not doing 
what we expect it to do. Though it may not be a bug in `getLexicalDeclContext` 
because I do not know if "lexical parent of a template specialization" is well 
defined.

https://github.com/llvm/llvm-project/pull/178441
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to