summaryrefslogtreecommitdiff
path: root/unittests/AST
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-06-07 20:31:48 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-06-07 20:31:48 +0000
commit44ee0a710c59d8e6793189f903bae21c16814324 (patch)
tree7c66e268bc8fb550f79f9876938353df8ca2ff7f /unittests/AST
parent6071af93f9b3c5a361c2f11566003d729418be3d (diff)
downloadclang-44ee0a710c59d8e6793189f903bae21c16814324.tar.gz
clang-44ee0a710c59d8e6793189f903bae21c16814324.tar.bz2
clang-44ee0a710c59d8e6793189f903bae21c16814324.tar.xz
Re-commit r183466 with a fix to make the TypeLoc casting machinery work
correctly in the presence of qualified types. (I had to change the unittest because it was trying to cast a QualifiedTypeLoc to TemplateSpecializationTypeLoc.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/AST')
-rw-r--r--unittests/AST/SourceLocationTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/unittests/AST/SourceLocationTest.cpp b/unittests/AST/SourceLocationTest.cpp
index 55356f11da..990e6dfc85 100644
--- a/unittests/AST/SourceLocationTest.cpp
+++ b/unittests/AST/SourceLocationTest.cpp
@@ -159,7 +159,7 @@ class TemplateAngleBracketLocRangeVerifier : public RangeVerifier<TypeLoc> {
protected:
virtual SourceRange getRange(const TypeLoc &Node) {
TemplateSpecializationTypeLoc T =
- Node.castAs<TemplateSpecializationTypeLoc>();
+ Node.getUnqualifiedLoc().castAs<TemplateSpecializationTypeLoc>();
assert(!T.isNull());
return SourceRange(T.getLAngleLoc(), T.getRAngleLoc());
}