]> granicus.if.org Git - clang/commit
Several related changes:
authorChris Lattner <sabre@nondot.org>
Sat, 14 Feb 2009 07:37:35 +0000 (07:37 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 14 Feb 2009 07:37:35 +0000 (07:37 +0000)
commit026dc96ac6ece60da5e1b98e2a71bd0ff0939fd8
tree60f69baca2a6bbbe35475d1155cf5ec41b7b0df1
parent90e150d7f40e24ed6f8d268e7d83b2f15153c1ee
Several related changes:
1) implement parser and sema support for reading and verifying attribute(warnunusedresult).
2) rename hasLocalSideEffect to isUnusedResultAWarning, inverting the sense
   of its result.
3) extend isUnusedResultAWarning to directly return the loc and range
   info that should be reported to the user.  Make it substantially more
   precise in some cases than what was previously reported.
4) teach isUnusedResultAWarning about CallExpr to decls that are
   pure/const/warnunusedresult, fixing a fixme.
5) change warn_attribute_wrong_decl_type to not pass in english strings, instead,
   pass in integers and use %select.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64543 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Attr.h
include/clang/AST/Expr.h
include/clang/AST/Stmt.h
include/clang/Basic/DiagnosticSemaKinds.def
lib/AST/Expr.cpp
lib/Parse/AttributeList.cpp
lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaStmt.cpp
test/Sema/attr-warn_unused_result.c [new file with mode: 0644]
test/Sema/dllimport-dllexport.c