summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST/SourceLocationTest.cpp
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
commit7152fbe57ef2ba15bf90f9a27f5d273e0e92ef42 (patch)
tree03284a8f1dcd9694833e62b26fa65644b272206c /clang/unittests/AST/SourceLocationTest.cpp
parent1b0a9494823e57bec2374bd9f7e040a7356cc2ae (diff)
downloadbcm5719-llvm-7152fbe57ef2ba15bf90f9a27f5d273e0e92ef42.tar.gz
bcm5719-llvm-7152fbe57ef2ba15bf90f9a27f5d273e0e92ef42.zip
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.) llvm-svn: 183563
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r--clang/unittests/AST/SourceLocationTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp
index 55356f11dad..990e6dfc85a 100644
--- a/clang/unittests/AST/SourceLocationTest.cpp
+++ b/clang/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());
}
OpenPOWER on IntegriCloud