diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-02-12 08:08:54 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-02-12 08:08:54 +0000 |
commit | a096b14d1d973f2bc40b2108cfbeedeacdcc42d1 (patch) | |
tree | 4671255e908c463b558ad2cad3f7f4b74062ccf5 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | 7b5f4f3facd9df205123b6f1ca2428c3caa95eee (diff) | |
download | bcm5719-llvm-a096b14d1d973f2bc40b2108cfbeedeacdcc42d1.tar.gz bcm5719-llvm-a096b14d1d973f2bc40b2108cfbeedeacdcc42d1.zip |
The meat of this patch is in BuildCXXMemberCalLExpr where we make it use
MarkMemberReferenced instead of marking functions referenced directly. An audit
of callers to MarkFunctionReferenced and DiagnoseUseOfDecl also caused a few
other changes:
* don't mark functions odr-used when considering them for an initialization
sequence. Do mark them referenced though.
* the function nominated by the cleanup attribute should be diagnosed.
* operator new/delete should be diagnosed when building a 'new' expression.
llvm-svn: 174951
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 4c8d098158e..97d1ea2cf1d 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -2849,6 +2849,7 @@ static void handleCleanupAttr(Sema &S, Decl *D, const AttributeList &Attr) { CleanupAttr(Attr.getRange(), S.Context, FD, Attr.getAttributeSpellingListIndex())); S.MarkFunctionReferenced(Attr.getParameterLoc(), FD); + S.DiagnoseUseOfDecl(FD, Attr.getParameterLoc()); } /// Handle __attribute__((format_arg((idx)))) attribute based on |