================
@@ -332,6 +360,16 @@ static bool isStandardSmartPointer(const ValueDecl *VD) {
   if (!RecordDecl)
     return false;
 
+  // Use the definition for the declaration, as it is the expected place to add
+  // the annotations.
+  const CXXRecordDecl *DefinitionDecl = RecordDecl->getDefinition();
+  if (DefinitionDecl != nullptr) {
----------------
zeyi2 wrote:

```suggestion
  if (DefinitionDecl) {
```

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

Reply via email to