| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
make sure that's safe. Get rid of a check which is now unnecessary in Sema::getFunctionLevelDeclContext().
llvm-svn: 147837
|
| |
|
|
| |
llvm-svn: 147830
|
| |
|
|
|
|
|
|
| |
- reject definitions of enums within friend declarations
- require 'enum', not 'enum class', for non-declaring references to scoped
enumerations
llvm-svn: 147824
|
| |
|
|
|
|
|
|
|
| |
source file. Otherwise -g -save-temps will error out on the compile
of any .c file.
Fixes about 4000 of the errors in the clang-tests gdb test suite.
llvm-svn: 147819
|
| |
|
|
| |
llvm-svn: 147818
|
| |
|
|
|
|
|
| |
c++ objects with non-trivial assignment/copy functions.
Also, one additional sema check. // rdar://6137845
llvm-svn: 147817
|
| |
|
|
| |
llvm-svn: 147812
|
| |
|
|
|
|
| |
intended to cover C++ class definitions.
llvm-svn: 147808
|
| |
|
|
|
|
| |
specialization.
llvm-svn: 147798
|
| |
|
|
| |
llvm-svn: 147791
|
| |
|
|
|
|
| |
padding insertion will not work if the coerced type is not a structure.
llvm-svn: 147786
|
| |
|
|
|
|
| |
Thanks to David Blaikie for pointing this out.
llvm-svn: 147783
|
| |
|
|
|
|
|
|
| |
the anonymous namespace to its parent. Semantically, this means that
the anonymous namespaces defined in one module are distinct from the
anonymous namespaces defined in another module.
llvm-svn: 147782
|
| |
|
|
|
|
|
|
|
|
| |
that we can merge, for example, two occurrences of
namespace N { void f(); }
in two disjoint modules.
llvm-svn: 147780
|
| |
|
|
|
|
|
|
|
| |
modules. Teach name lookup into namespaces to search in each of the
merged DeclContexts as well as the (now-primary) DeclContext. This
supports the common case where two different modules put something
into the same namespace.
llvm-svn: 147778
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is important because it's fairly common for headers (especially system
headers) to want to provide only those typedefs needed for that
particular header, based on some guard macro, e.g.,
#ifndef _SIZE_T
#define _SIZE_T
typedef long size_t;
#endif
which is repeated in a number of headers. The guard macro protects
against duplicate definitions. However, this means that only the first
occurrence of this pattern actually defines size_t, so the submodule
corresponding to this header has the only visible definition. If a
user then imports a different submodule from the same module, size_t
will be known but not visible, and therefore cannot be used.
By allowing redefinition of typedefs, each header that wants to define
size_t can do so independently, so it will be available in the
corresponding submodules.
llvm-svn: 147775
|
| |
|
|
| |
llvm-svn: 147774
|
| |
|
|
| |
llvm-svn: 147771
|
| |
|
|
|
|
| |
c++ object properties. wip.
llvm-svn: 147750
|
| |
|
|
| |
llvm-svn: 147744
|
| |
|
|
| |
llvm-svn: 147737
|
| |
|
|
|
|
| |
88 -> 80 bytes on x86_64.
llvm-svn: 147736
|
| |
|
|
|
|
| |
with non-trivial copies. // rdar://6137845
llvm-svn: 147735
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
A patch by Dmitri Gribenko!
The attached patch fixes a use-after-free in AnalysisConsumer::HandleTranslationUnit. The problem is that
BugReporter's destructor runs after AnalysisManager has been already
deleted. The fix introduces a scope to force correct destruction
order.
A crash happens only when reports have been added in AnalysisConsumer::HandleTranslationUnit's BugReporter. We don't have such checkers in clang so no test.
llvm-svn: 147732
|
| |
|
|
| |
llvm-svn: 147730
|
| |
|
|
|
|
|
|
|
|
|
|
| |
to Redeclarable<NamespaceDecl>, so that we benefit from the improveed
redeclaration deserialization and merging logic provided by
Redeclarable<T>. Otherwise, no functionality change.
As a drive-by fix, collapse the "inline" bit into the low bit of the
original namespace/anonymous namespace, saving 8 bytes per
NamespaceDecl on x86_64.
llvm-svn: 147729
|
| |
|
|
|
|
| |
complicated, but we have to be careful about when exactly captures are marked given PotentiallyPotentiallyEvaluated contexts. (Actually, it's not 100% correct yet, but it's close enough for the moment.)
llvm-svn: 147723
|
| |
|
|
|
|
|
|
|
| |
We already have a more conservative check in the compiler (if the
format string is not a literal, we warn). Still adding it here for
completeness and since this check is stronger - only triggered if the
format string is tainted.
llvm-svn: 147714
|
| |
|
|
| |
llvm-svn: 147713
|
| |
|
|
|
|
| |
This patch (and some of my other commits related to lambdas) is heavily based off of John Freeman's work-in-progress patches.
llvm-svn: 147706
|
| |
|
|
|
|
|
|
| |
ExprEngine::processCallEnter().
This removes analysis of other translation units, but that was an experimental feature anyway that we will revisit later.
llvm-svn: 147705
|
| |
|
|
|
|
|
|
| |
is inserted before the real argument. Padding is needed to ensure the backend
reads from or writes to the correct argument slots when the original alignment
of a byval structure is unavailable due to flattening.
llvm-svn: 147699
|
| |
|
|
| |
llvm-svn: 147698
|
| |
|
|
|
|
|
|
| |
ExprEngine::processCallExit() do the work manually. This is a nice simplification.
Along the way, fix Exprengine::processCallExit() to also perform the postStmt callback for checkers for CallExprs.
llvm-svn: 147697
|
| |
|
|
|
|
|
| |
Along the way, move a helper function from SemaChecking.cpp to a more
accessible home in SourceManager.
llvm-svn: 147692
|
| |
|
|
|
|
|
|
| |
currently turned off. // rdar://6137845
Also, fixes a test case which should be nonatomic under
new API.
llvm-svn: 147691
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
entries map from
(Stmt*,LocationContext*) pairs to SVals instead of Stmt* to SVals.
This is needed to support basic IPA via inlining. Without this, we cannot tell
if a Stmt* binding is part of the current analysis scope (StackFrameContext) or
part of a parent context.
This change introduces an uglification of the use of getSVal(), and thus takes
two steps forward and one step back. There are also potential performance implications
of enlarging the Environment. Both can be addressed going forward by refactoring the
APIs and optimizing the internal representation of Environment. This patch
mainly introduces the functionality upon when we want to build upon (and clean up).
llvm-svn: 147688
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
chain to determine whether any declaration of the given entity is
visible, eliminating the redundant (and less efficient)
getPreviousDeclaration() implementation.
This tweak uncovered an omission in the handling of
RedeclarableTemplateDecl, where we weren't making sure to search for
additional redeclarations of a template in other module files. Things
would be cleaner if RedeclarableTemplateDecl actually used Redeclarable.
llvm-svn: 147687
|
| |
|
|
| |
llvm-svn: 147681
|
| |
|
|
| |
llvm-svn: 147678
|
| |
|
|
| |
llvm-svn: 147677
|
| |
|
|
| |
llvm-svn: 147672
|
| |
|
|
| |
llvm-svn: 147670
|
| |
|
|
|
|
| |
"double" rounding.
llvm-svn: 147669
|
| |
|
|
|
|
|
| |
properties of c++ object types with non-trivial
assignment copy. Not used yet. // rdar://6137845
llvm-svn: 147666
|
| |
|
|
| |
llvm-svn: 147664
|
| |
|
|
| |
llvm-svn: 147663
|
| |
|
|
|
|
|
|
|
|
| |
include stack to find the first file that is known to be part of the
module. This copes with situations where the module map doesn't
completely specify all of the headers that are involved in the module,
which can come up when there are very strange #include_next chains
(e.g., with weird compiler/stdlib headers like stdarg.h or float.h).
llvm-svn: 147662
|
| |
|
|
|
|
| |
As Matt pointed out, this should be just a link to 'ccc-analyzer'.
llvm-svn: 147661
|
| |
|
|
|
|
|
|
| |
into the two unused lower bits of the NextDeclInContext link, dropping
the number of bits in Decl down to 32, and saving 8 bytes per
declaration on x86-64.
llvm-svn: 147660
|