| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
duplicates attributes on the declaration. Also eliminates a false negative in
ReleasableMutexLock. Fixing this bug required some refactoring.
llvm-svn: 159780
|
|
|
|
| |
llvm-svn: 159723
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This required moving the ctors for IntegerLiteral and FloatingLiteral out of
line which shouldn't change anything as they are usually called through Create
methods that are already out of line.
ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector
and make it independent from ASTContext.h
Pass the StorageAllocator directly to AccessedEntity so it doesn't need to
have a definition of ASTContext around.
llvm-svn: 159718
|
|
|
|
| |
llvm-svn: 159679
|
|
|
|
|
|
| |
e.g. ExprWithCleanups.
llvm-svn: 159674
|
|
|
|
|
|
|
| |
initialize any variable. This is extremely conservative, but is sufficient for
now.
llvm-svn: 159620
|
|
|
|
|
|
|
| |
use scoped_lockable without putting unlock_function on the
destructor.
llvm-svn: 159609
|
|
|
|
|
|
| |
locks_required function.
llvm-svn: 159607
|
|
|
|
| |
llvm-svn: 159606
|
|
|
|
| |
llvm-svn: 159601
|
|
|
|
|
|
|
|
|
| |
we are encountering some scalability issues with memory usage. The
appropriate long term fix is to make the analysis more scalable, but
this will at least prevent the analyzer swapping when
analyzing very large functions.
llvm-svn: 159578
|
|
|
|
|
|
| |
lockable objects.
llvm-svn: 159387
|
|
|
|
| |
llvm-svn: 159152
|
|
|
|
|
|
|
|
| |
properly if there is a join point in the control flow graph that involves
a trylock. Also changes the source locations of some warnings to be
more consistent.
llvm-svn: 159008
|
|
|
|
|
|
|
|
|
| |
express library-level dependencies within Clang.
This is no more verbose really, and plays nicer with the rest of the
CMake facilities. It should also have no change in functionality.
llvm-svn: 158888
|
|
|
|
|
|
|
| |
initializer, it is uninitialized, even if we may be coming from somewhere where
it was initialized.
llvm-svn: 158611
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
value_type
In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.
This rolls back r155808 and r155869.
Review by Doug Gregor incorporating feedback from Chandler Carruth.
llvm-svn: 158104
|
|
|
|
|
|
| |
-Wunused-private-field.
llvm-svn: 158086
|
|
|
|
|
|
|
|
| |
harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed.
Only 1 minor code change was necessary: can't use cdecl as variable name anymore.
llvm-svn: 158063
|
|
|
|
| |
llvm-svn: 157962
|
|
|
|
| |
llvm-svn: 157961
|
|
|
|
| |
llvm-svn: 157833
|
|
|
|
| |
llvm-svn: 157716
|
|
|
|
|
|
|
|
|
|
|
| |
-Wsometimes-uninitialized. This detects cases where an explicitly-written branch
inevitably leads to an uninitialized variable use (so either the branch is dead
code or there is an uninitialized use bug).
This chunk of warnings tentatively lives within -Wuninitialized, in order to
give it more visibility to existing Clang users.
llvm-svn: 157458
|
|
|
|
|
|
| |
functional change.
llvm-svn: 157440
|
|
|
|
|
|
|
|
|
| |
For "%hhx", printf expects an unsigned char. This makes Clang
accept a 'char' argument for that also when using -funsigned-char.
This fixes PR12761.
llvm-svn: 156388
|
|
|
|
|
|
|
|
|
|
|
|
| |
promotion of wchar_t - they may differ in signedness.
Teach ASTContext about WIntType, and have it taken from TargetInfo like WCharType. Should fix test/Sema/format-strings.c for ARM, with the exception of one subtest which will fail if wint_t and wchar_t are the same size and wint_t is signed, wchar_t is unsigned.
There'll be a followup commit to fix that.
Reviewed by Chandler and Hans at http://llvm.org/reviews/r/8
llvm-svn: 156165
|
|
|
|
|
|
|
|
|
|
|
|
| |
cases in switch statements. Also add a [[clang::fallthrough]] attribute, which
can be used to suppress the warning in the case of intentional fallthrough.
Patch by Alexander Kornienko!
The handling of C++11 attribute namespaces in this patch is temporary, and will
be replaced with a cleaner mechanism in a subsequent patch.
llvm-svn: 156086
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
filter_decl_iterator had a weird mismatch where both op* and op-> returned T*
making it difficult to generalize this filtering behavior into a reusable
library of any kind.
This change errs on the side of value, making op-> return T* and op* return
T&.
(reviewed by Richard Smith)
llvm-svn: 155808
|
|
|
|
|
|
|
|
|
|
|
| |
g++4.7, which reuses stack space allocated for temporaries. CFGElement::getAs
returns a suitably-cast version of 'this'. Patch by Markus Trippelsdorf!
No test: this code has the same observable behavior as the old code when built
with most compilers, and the tests were already failing when built with a
compiler for which this produced a broken binary.
llvm-svn: 155803
|
|
|
|
|
|
| |
cross-TU inlining never panned out.
llvm-svn: 155751
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed to ensure that we always report issues in the correct
function. For example, leaks are identified when we call remove dead
bindings. In order to make sure we report a callee's leak in the callee,
we have to run the operation in the callee's context.
This change required quite a bit of infrastructure work since:
- We used to only run remove dead bindings before a given statement;
here we need to run it after the last statement in the function. For
this, we added additional Program Point and special mode in the
SymbolReaper to remove all symbols in context lower than the current
one.
- The call exit operation turned into a sequence of nodes, which are
now guarded by CallExitBegin and CallExitEnd nodes for clarity and
convenience.
(Sorry for the long diff.)
llvm-svn: 155244
|
|
|
|
|
|
| |
path-sensitive analysis like handling of trylock expressions.
llvm-svn: 155137
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a new flavor of exception specification, EST_Uninstantiated. A function
type with this exception specification carries a pointer to a FunctionDecl, and
the exception specification for that FunctionDecl is instantiated (if needed)
and used in the place of the function type's exception specification.
When a function template declaration with a non-trivial exception specification
is instantiated, the specialization's exception specification is set to this
new 'uninstantiated' kind rather than being instantiated immediately.
Expr::CanThrow has migrated onto Sema, so it can instantiate exception specs
on-demand. Also, any odr-use of a function triggers the instantiation of its
exception specification (the exception specification could be needed by IRGen).
In passing, fix two places where a DeclRefExpr was created but the corresponding
function was not actually marked odr-used. We used to get away with this, but
don't any more.
Also fix a bug where instantiating an exception specification which refers to
function parameters resulted in a crash. We still have the same bug in default
arguments, which I'll be looking into next.
This, plus a tiny patch to fix libstdc++'s common_type, is enough for clang to
parse (and, in very limited testing, support) all of libstdc++4.7's standard
headers.
llvm-svn: 154886
|
|
|
|
|
|
|
|
|
| |
attached. Since we do not support any attributes which appertain to a statement
(yet), testing of this is necessarily quite minimal.
Patch by Alexander Kornienko!
llvm-svn: 154723
|
|
|
|
| |
llvm-svn: 154672
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should not deserialize unused declarations from the PCH file. Achieve
this by storing the top level declarations during parsing
(HandleTopLevelDecl ASTConsumer callback) and analyzing/building a call
graph only for those.
Tested the patch on a sample ObjC file that uses PCH. With the patch,
the analyzes is 17.5% faster and clang consumes 40% less memory.
Got about 10% overall build/analyzes time decrease on a large Objective
C project.
A bit of CallGraph refactoring/cleanup as well..
llvm-svn: 154625
|
|
|
|
| |
llvm-svn: 154611
|
|
|
|
|
|
| |
enclosing function.
llvm-svn: 154607
|
|
|
|
|
|
| |
function definitions. Fixes <rdar://problem/11178609>.
llvm-svn: 154081
|
|
|
|
|
|
| |
map.
llvm-svn: 153407
|
|
|
|
|
|
| |
evaluateAsBooleanConditionNoCache(S) might update the map and invalidate the iterator.
llvm-svn: 153406
|
|
|
|
|
|
|
|
|
|
| |
during construction of branches for chained logical operators.
This makes -fsyntax-only for test/Sema/many-logical-ops.c about 32x times faster.
With measuring SemaExpr.cpp I see differences below the noise level.
llvm-svn: 153297
|
|
|
|
|
|
| |
with a while loop (PR 12325).
llvm-svn: 153242
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically, we use the last store of the leaked symbol in the leak diagnostic.
(No support for struct fields since the malloc checker doesn't track those
yet.)
+ Infrastructure to track the regions used in store evaluations.
This approach is more precise than iterating the store to
obtain the region bound to the symbol, which is used in RetainCount
checker. The region corresponds to what is uttered in the code in the
last store and we do not rely on the store implementation to support
this functionality.
llvm-svn: 153212
|
|
|
|
|
|
|
| |
on code using multi-dimensional arrays. Fix by DeLesley Hutchins, and reported in
PR 12271.
llvm-svn: 153067
|
|
|
|
|
|
|
|
| |
are now just simple wrappers around method families, and method decls can cache method family lookups. Also, no one is using them right now.
The one difference between ObjCMethodDecl::getMethodFamily and Selector::getMethodFamily is that the former will do some additional sanity checking, and since CoreFoundation types don't look like Objective-C objects, an otherwise interesting method will get a method family of OMF_None. Future clients that use method families should consider how they want to handle CF types.
llvm-svn: 153000
|
|
|
|
| |
llvm-svn: 152839
|
|
|
|
| |
llvm-svn: 152738
|
|
|
|
|
|
| |
collecting function Decls.
llvm-svn: 152651
|