summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-06 23:10:54 +0000
committerChris Lattner <sabre@nondot.org>2008-04-06 23:10:54 +0000
commitfc4379f916dbc7d31d0605f5f2d252ac4626f31b (patch)
treee10978a7e1d145daef650f108b3e99f1aebad978 /clang/lib/Sema/SemaDecl.cpp
parentf1e4ec28980552371d513f06ea643bfc2043e840 (diff)
downloadbcm5719-llvm-fc4379f916dbc7d31d0605f5f2d252ac4626f31b.tar.gz
bcm5719-llvm-fc4379f916dbc7d31d0605f5f2d252ac4626f31b.zip
remove the Decl::getCanonicalType() method.
llvm-svn: 49295
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 9498fb2c9e0..0f464a0bc79 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -280,8 +280,8 @@ FunctionDecl *Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD) {
MergeAttributes(New, Old);
- QualType OldQType = Old->getType().getCanonicalType();
- QualType NewQType = New->getType().getCanonicalType();
+ QualType OldQType = Context.getCanonicalType(Old->getType());
+ QualType NewQType = Context.getCanonicalType(New->getType());
// Function types need to be compatible, not identical. This handles
// duplicate function decls like "void f(int); void f(enum X);" properly.
@@ -357,8 +357,9 @@ VarDecl *Sema::MergeVarDecl(VarDecl *New, Decl *OldD) {
MergeAttributes(New, Old);
// Verify the types match.
- if (Old->getCanonicalType() != New->getCanonicalType() &&
- !areEquivalentArrayTypes(New->getCanonicalType(), Old->getCanonicalType())) {
+ QualType OldCType = Context.getCanonicalType(Old->getType());
+ QualType NewCType = Context.getCanonicalType(New->getType());
+ if (OldCType != NewCType && !areEquivalentArrayTypes(NewCType, OldCType)) {
Diag(New->getLocation(), diag::err_redefinition, New->getName());
Diag(Old->getLocation(), diag::err_previous_definition);
return New;
OpenPOWER on IntegriCloud