File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -436,7 +436,9 @@ class visitor : public clang::RecursiveASTVisitor<visitor> {
436436 // Insert the annotation immediately before the tag name, which is the
437437 // position returned by getLocation.
438438 clang::LangOptions LO = RD->getASTContext ().getLangOpts ();
439- clang::SourceLocation SLoc = RD->getLocation ();
439+ clang::SourceLocation SLoc = RD->getQualifier ()
440+ ? RD->getQualifierLoc ().getBeginLoc ()
441+ : RD->getLocation ();
440442 const clang::SourceLocation location =
441443 context_.getFullLoc (SLoc).getExpansionLoc ();
442444 unexported_public_interface (RD, location)
Original file line number Diff line number Diff line change 1+ // RUN: %idt --export-macro=IDT_TEST_ABI %s 2>&1 | %FileCheck %s
2+
3+ namespace ContainerNamespace {
4+ // CHECK-NOT: QualifiedRecordNames.hh:[[@LINE+1]]:{{.*}}
5+ struct QualifiedNameClass ;
6+ }
7+
8+ // CHECK: QualifiedRecordNames.hh:[[@LINE+1]]:8: remark: unexported public interface 'QualifiedNameClass'
9+ struct ContainerNamespace ::QualifiedNameClass {
10+ // CHECK-NOT: QualifiedRecordNames.hh:[[@LINE-1]]:{{.*}}
11+
12+ // CHECK-NOT: QualifiedRecordNames.hh:[[@LINE+1]]:{{.*}}
13+ virtual void method ();
14+ };
15+
16+ // CHECK-NOT: QualifiedRecordNames.hh:[[@LINE+1]]:{{.*}}
17+ struct ContainerClass {
18+ // CHECK-NOT: QualifiedRecordNames.hh:[[@LINE+1]]:{{.*}}
19+ struct QualifiedNameClass ;
20+ };
21+
22+ // CHECK: QualifiedRecordNames.hh:[[@LINE+1]]:8: remark: unexported public interface 'QualifiedNameClass'
23+ struct ContainerClass ::QualifiedNameClass {
24+ // CHECK-NOT: QualifiedRecordNames.hh:[[@LINE-1]]:{{.*}}
25+
26+ // CHECK-NOT: QualifiedRecordNames.hh:[[@LINE+1]]:{{.*}}
27+ virtual void method ();
28+ };
29+
You can’t perform that action at this time.
0 commit comments