aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/AnalysisBasedWarnings.cpp
AgeCommit message (Collapse)Author
2010-07-26Fix namespace polution.Dan Gohman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109440 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19Fix construction of AnalysisContext. Thanks Daniel.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108694 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-17Add a hack to silence warnings about failing to return from functions afterChandler Carruth
a temporary with a noreturn destructor has been created. Fixes PR6884 for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104000 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-16Don't emit any fallthrough / missing-noreturn warnings if we can'tJohn McCall
compute a CFG for a function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103905 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-30Don't perform AnalysisBasedWarnings in Sema or run the static analyzer when aTed Kremenek
fatal error has occurred. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102778 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-30An edge from a call expression to the exit block is only an abnormal edgeJohn McCall
if *none* of the successors of the call expression is the exit block. This matters when a call of bool type is the condition of (say) a while loop in a function with no statements after the loop. This *can* happen in C, but it's much more common in C++ because of overloaded operators. Suppresses some substantial number of spurious -Wmissing-noreturn warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102696 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16If a non-noreturn virtual member function is guaranteed not to return,Douglas Gregor
do *not* suggest that the function could be attribute 'noreturn'; overridden functions may end up returning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101572 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08Remove micro-optimization for not issueing CFG-based warnings for 'static ↵Ted Kremenek
inline' functions unless they are used. I discussed this with Daniel Dunbar, and we agreed that this provides an inconsistent warnings experience for the user and that there were genuine cases where we wouldn't want to do this optimization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100800 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08Removed unused object.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100750 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08Use SmallVector instead of an std::queue.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100730 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30the big refactoring bits of PR3782.Rafael Espindola
This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99920 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-29Be a bit more consistent in using operator->Rafael Espindola
This patch moves some methods from QualType to Type and changes the users to use -> instead of . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99805 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23For forward-declared static inline functions, delay CFG-based warnings until weTed Kremenek
encounter a definition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99243 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23Only perform CFG-based warnings on 'static inline' functions thatTed Kremenek
are called (transitively) by regular functions/blocks within a translation untion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-20Don't bother running the analysis for CFG-based warnings if theTed Kremenek
declaration is in a system header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99087 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-20Refactor CFG-based warnings in Sema to be run by a worked object called ↵Ted Kremenek
AnalysisBasedWarnings. This object controls when the warnings are executed, allowing the client code in Sema to selectively disable warnings as needed. Centralizing the logic for analysis-based warnings allows us to optimize when and how they are run. Along the way, remove the redundant logic for the 'check fall-through' warning for blocks; now the same logic is used for both blocks and functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99085 91177308-0d34-0410-b5e6-96231b3b80d8