================
@@ -332,6 +358,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) {
----------------
vbvictor wrote:
```suggestion
if (const CXXRecordDecl *DefinitionDecl = RecordDecl->getDefinition()) {
```
https://github.com/llvm/llvm-project/pull/186903
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits