================
@@ -0,0 +1,348 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify 
%s
+
+void clang_analyzer_warnIfReached();
+
+// ============================================================================
+// Group A: Basic class template — attribute on primary
+// ============================================================================
+
+// Placeholder types for triggering instantiations.
+// - Type{A,B} should match an unconstrained template type parameter.
+// - Specialized{A,B} should match some specialization pattern.
+struct TypeA{};
+struct TypeB{};
+struct SpecializedA{};
+struct SpecializedB{};
+
+template <typename T>
+class [[clang::suppress]] A_Primary {
+public:
+  void inline_method() {
+    clang_analyzer_warnIfReached(); // no-warning
+  }
+  void outline_method();
+  static void static_inline() {
+    clang_analyzer_warnIfReached(); // no-warning
+  }
+  static void static_outline();
+};
+
+template <typename T>
+void A_Primary<T>::outline_method() {
+  // Out-of-line: lexical context is namespace.
----------------
steakhal wrote:

```suggestion
  // Out-of-line: lexical context is the translation unit.
```

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

Reply via email to