aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2009-12-23 23:40:33 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2009-12-23 23:40:33 +0000
commitf75b8309e3e40290683e3d34bac3a04e88d9c625 (patch)
tree8f2f012f961728ffe260ae526a29145a42a69996 /lib/Sema/SemaDecl.cpp
parent35628d1f17c817f8c240208db7ba490e3109981b (diff)
allow the noreturn attribute to be used in class methods
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index f62d0aa6f9..b7584c311e 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -929,7 +929,9 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD) {
// (C++98 8.3.5p3):
// All declarations for a function shall agree exactly in both the
// return type and the parameter-type-list.
- if (OldQType == NewQType)
+ // attributes should be ignored when comparing.
+ if (Context.getNoReturnType(OldQType, false) ==
+ Context.getNoReturnType(NewQType, false))
return MergeCompatibleFunctionDecls(New, Old);
// Fall through for conflicting redeclarations and redefinitions.