summaryrefslogtreecommitdiff
path: root/tools/libclang/CIndexUSRs.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-06-12 15:46:16 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-06-12 15:46:16 +0000
commit29cafa66ad3878dbb9f82615f19fa0bded2e443c (patch)
treec5e9e10bc189de0058aa763c47b9920a8351b7df /tools/libclang/CIndexUSRs.cpp
parent01af97d3b23bded2b2b21af19bbc6e4cce49e5b3 (diff)
Notes
Diffstat (limited to 'tools/libclang/CIndexUSRs.cpp')
-rw-r--r--tools/libclang/CIndexUSRs.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/libclang/CIndexUSRs.cpp b/tools/libclang/CIndexUSRs.cpp
index 9917d2ad21042..4f1f071c1dd20 100644
--- a/tools/libclang/CIndexUSRs.cpp
+++ b/tools/libclang/CIndexUSRs.cpp
@@ -477,6 +477,9 @@ bool USRGenerator::GenLoc(const Decl *D) {
return true;
}
+ // Use the location of canonical decl.
+ D = D->getCanonicalDecl();
+
const SourceManager &SM = AU->getSourceManager();
SourceLocation L = D->getLocStart();
if (L.isInvalid()) {