- Jan 10, 2012
-
-
Eli Friedman authored
Implement the missing pieces of Evaluate for _Complex types. With that complete, remove some code from CGExprConstant which is no longer necessary. While I'm here, a couple minor tweaks to _Complex-in-C++. (Specifically, make _Complex types literal types, and don't warn for _Complex int.) llvm-svn: 147840
-
Richard Smith authored
constructors. These are a special case whose behavior cannot be modeled as a user-written constructor. llvm-svn: 147839
-
Eli Friedman authored
Per John's comment, it makes sense to ask isLambda on any CXXRecordDecl; make sure that's safe. Get rid of a check which is now unnecessary in Sema::getFunctionLevelDeclContext(). llvm-svn: 147837
-
Argyrios Kyrtzidis authored
llvm-svn: 147830
-
Richard Smith authored
- reject definitions of enums within friend declarations - require 'enum', not 'enum class', for non-declaring references to scoped enumerations llvm-svn: 147824
-
Eric Christopher authored
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
-
Eric Christopher authored
llvm-svn: 147818
-
Fariborz Jahanian authored
c++ objects with non-trivial assignment/copy functions. Also, one additional sema check. // rdar://6137845 llvm-svn: 147817
-
Eli Friedman authored
llvm-svn: 147812
-
- Jan 09, 2012
-
-
Richard Smith authored
intended to cover C++ class definitions. llvm-svn: 147808
-
Nico Weber authored
llvm-svn: 147798
-
Akira Hatanaka authored
llvm-svn: 147791
-
Akira Hatanaka authored
padding insertion will not work if the coerced type is not a structure. llvm-svn: 147786
-
Richard Smith authored
Thanks to David Blaikie for pointing this out. llvm-svn: 147783
-
Douglas Gregor authored
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
-
Douglas Gregor authored
that we can merge, for example, two occurrences of namespace N { void f(); } in two disjoint modules. llvm-svn: 147780
-
Douglas Gregor authored
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
-
Douglas Gregor authored
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
-
Abramo Bagnara authored
llvm-svn: 147774
-
Craig Topper authored
llvm-svn: 147771
-
- Jan 08, 2012
-
-
Fariborz Jahanian authored
c++ object properties. wip. llvm-svn: 147750
-
- Jan 07, 2012
-
-
Rafael Espindola authored
llvm-svn: 147744
-
Benjamin Kramer authored
llvm-svn: 147737
-
Benjamin Kramer authored
88 -> 80 bytes on x86_64. llvm-svn: 147736
-
Fariborz Jahanian authored
with non-trivial copies. // rdar://6137845 llvm-svn: 147735
-
Anna Zaks authored
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
-
Abramo Bagnara authored
llvm-svn: 147730
-
Douglas Gregor authored
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
-
Eli Friedman authored
More lambda work: semantic analysis of capturing 'this'. It's a bit 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
-
Anna Zaks authored
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
-
Argyrios Kyrtzidis authored
llvm-svn: 147713
-
Eli Friedman authored
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
-
Ted Kremenek authored
This removes analysis of other translation units, but that was an experimental feature anyway that we will revisit later. llvm-svn: 147705
-
Akira Hatanaka authored
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
-
Ted Kremenek authored
llvm-svn: 147698
-
Ted Kremenek authored
[analyzer] Remove CallExitNodeBuilder, and have 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
-
- Jan 06, 2012
-
-
Matt Beaumont-Gay authored
Along the way, move a helper function from SemaChecking.cpp to a more accessible home in SourceManager. llvm-svn: 147692
-
Fariborz Jahanian authored
currently turned off. // rdar://6137845 Also, fixes a test case which should be nonatomic under new API. llvm-svn: 147691
-
Ted Kremenek authored
(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
-
Douglas Gregor authored
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
-