summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Delay complete-type checking for arguments to no-prototype functionsDouglas Gregor2010-10-261-12/+6
| | | | | | | | until after we've checked/promoted the argument. Hopefully fixes the Emacs regression due to my recent change that expanded type-checking in the presence of K&R function definitions. llvm-svn: 117353
* A couple of tweaks to the visibility rules: John McCall2010-10-265-27/+76
| | | | | | | | | | | - tags with C linkage should ignore visibility=hidden - functions and variables with explicit visibility attributes should ignore the linkage of their types Either of these should be sufficient to fix PR8457. Also, FileCheck-ize a test case. llvm-svn: 117351
* Pending further discussion, re-enable warnings for Objective CJohn McCall2010-10-265-16/+77
| | | | | | | | | | | covariant/contravariant overrides and implementations, but do so under control of a new flag (-Wno-objc-covariant-overrides, which yes does cover contravariance too). *At least* the covariance cases will probably be enabled by default shortly, but that's not totally uncontroversial. llvm-svn: 117346
* When de-serializing a type that is supposed to be canonical, callDouglas Gregor2010-10-264-23/+44
| | | | | | | | | | | | | getCanonicalType() to make sure that the type we got back is actually canonical. This is the case for most types, which always build a canonical type when given canonical components. However, some types that involve expressions in their canonicalization (e.g., array types with dependent sizes) don't always build canonical types from canonical components, because there is no such thing as a "canonical" expression. Therefore, we do this extra mapping to ensure that the canonical types we store are actually canonical. llvm-svn: 117344
* Fix lazy symbolication bug in RegionStore involving fields of global ↵Ted Kremenek2010-10-262-4/+34
| | | | | | | | | | | variables. When invalidated, the entire globals memory space gets assigned a symbolic value, but that value was not being used for lazy symbolication of fields of globals. This could result in cases where bogus null dereferences were being reported. Fixes PR 8440. llvm-svn: 117336
* Move 'includeGlobals' as a field into ClusterAnalysis.Ted Kremenek2010-10-261-8/+12
| | | | llvm-svn: 117335
* Tweak null dereference checker to give better diagnostics for null ↵Ted Kremenek2010-10-263-27/+55
| | | | | | dereferences resulting from array accesses. llvm-svn: 117334
* Add infrastructure for emitting TBAA metadata with the "constant" flag.Dan Gohman2010-10-252-4/+16
| | | | llvm-svn: 117328
* Patch for mis-compile of statement expressions withFariborz Jahanian2010-10-254-7/+96
| | | | | | | non-trivial copy constructors. // rdar: //8540501. A test will be added to llvm nightly tests. llvm-svn: 117324
* Trim an unnecessary #include.Dan Gohman2010-10-251-1/+0
| | | | llvm-svn: 117321
* Factor out the code for creating the Root and Char nodes, so thatDan Gohman2010-10-252-26/+37
| | | | | | they can be used outside of the main getTBAAInfo function. llvm-svn: 117320
* Add and describe a quick script to migrate gcc builtins that clang doesn'tEric Christopher2010-10-252-0/+170
| | | | | | know about to the default APIs for x86 vector operations. llvm-svn: 117313
* Look through the address-of operator to find the function beingDouglas Gregor2010-10-252-0/+5
| | | | | | called. Fixes another aspect of PR8314. llvm-svn: 117308
* When we're calling a function that we know based on its K&R-styleDouglas Gregor2010-10-252-11/+49
| | | | | | | | function definition, we should still use a prototype to type-check and convert the function arguments, if such a prototype exists. Fixes PR8314. llvm-svn: 117305
* Add check for UnknownVals for mutexes in ObjCAtSyncChecker. Fixes crash ↵Ted Kremenek2010-10-252-0/+13
| | | | | | reported in PR 8458. llvm-svn: 117300
* Only warn for mismatched types in Objective-C methods when they are ↵David Chisnall2010-10-254-10/+122
| | | | | | | | | | incompatible, not when they are simply different. Now we test whether the difference in types breaks the principle of substitutability, rather than whether they are different. A common idiom in Objective-C is to provide a definition of a method in a subclass that returns a more-specified version of an object than the superclass. This does not violate the principle of substitutability, because you can always use the object returned by the subclass anywhere that you could use the type returned by the superclass. It was, however, generating warnings with clang, leading people to believe that semantically correct code was incorrect and requiring less accurate type specification and explicit down-casts (neither of which is a good thing to encourage). This change ensures that any method definition has parameter and return types that make it accept anything that something conforming to the declaration may pass and return something that the caller will expect, but allows stricter definitions. llvm-svn: 117271
* Improve the tracking of source locations for parentheses in constructor calls.Chandler Carruth2010-10-2510-56/+89
| | | | | | | | | | | | This adds them where missing, and traces them through PCH. We fix at least one bug in the extents found by the Index library, and make a lot of refactoring tools which care about the exact formulation of a constructor call easier to write. Also some minor cleanups to more consistently follow the friend pattern instead of the setter pattern when rebuilding a serialized AST. Patch originally by Samuel Benzaquen. llvm-svn: 117254
* Added generation of destructors for member constant size arrays.Marcin Swiderski2010-10-252-2/+34
| | | | | | There's only one destructor call generated for each not empty array (at least for now this should be enough). llvm-svn: 117252
* Added generation of destructors for constant size arrays.Marcin Swiderski2010-10-252-2/+27
| | | | | | There's only one destructor call generated for each not empty array (at least for now this should be enough). llvm-svn: 117251
* Implement GNU C extension: two types are compatible if they appearPeter Collingbourne2010-10-244-3/+74
| | | | | | | as a function argument, one of the types is a transparent union type and the other type is compatible with a union member llvm-svn: 117243
* Keep track in chained PCH of implicit members that were added after the ↵Argyrios Kyrtzidis2010-10-246-7/+29
| | | | | | definition was completed. llvm-svn: 117240
* Start fleshing out ASTMutationListener; notify when a tag definition is ↵Argyrios Kyrtzidis2010-10-247-2/+57
| | | | | | | | | completed. In that case a chained PCH will record the updates to the DefinitionData pointer of forward references. If a forward reference mutated into a definition re-write it into the chained PCH, this is too big of a change. llvm-svn: 117239
* Introduce a DeclsToRewrite field in ASTWrite, used for collecting the decls ↵Argyrios Kyrtzidis2010-10-242-0/+11
| | | | | | that will be replaced in the chained PCH. llvm-svn: 117238
* Some method renaming, no functionality change.Argyrios Kyrtzidis2010-10-242-6/+6
| | | | llvm-svn: 117237
* Refactoring.Argyrios Kyrtzidis2010-10-245-108/+126
| | | | | | | - Pass around RecordDataImpl instead of the concrete RecordData so that any SmallVector can be used. - Move ASTDeclWriter::WriteCXXDefinitionData to ASTWriter::AddCXXDefinitionData. llvm-svn: 117236
* Put the mechanism in place to track modifications in an AST entity that were ↵Argyrios Kyrtzidis2010-10-2416-25/+197
| | | | | | | | | | | | committed after its initial creation/deserialization and store the changes in a chained PCH. The idea is that the AST entities call methods on the ASTMutationListener to give notifications of changes; the PCHWriter implements the ASTMutationListener interface and stores the incremental changes of the updated entity. WIP llvm-svn: 117235
* Simplify and "robust-ify" the way that CXXRecord references point to the ↵Argyrios Kyrtzidis2010-10-245-58/+44
| | | | | | | | definition data when loaded from PCH. Temporary disable 'test/PCH/chain-cxx.cpp' until a better way to fix it is in place. llvm-svn: 117234
* Minor refactoring; Pull reading/writing DefinitionData out into a function.Argyrios Kyrtzidis2010-10-242-89/+96
| | | | llvm-svn: 117233
* Fix tyop.Anders Carlsson2010-10-242-2/+2
| | | | llvm-svn: 117225
* - Fixed subexpressions evaluation order for binary operators to match order ↵Marcin Swiderski2010-10-242-11/+13
| | | | | | | | in code generated with the compiler, - Fixed test cases for unreachable code warnings produced by Sema. llvm-svn: 117220
* Move the "used but marked unused" warning behind a special warning flag for now.Anders Carlsson2010-10-245-3/+5
| | | | llvm-svn: 117219
* C++ [basic.scope.hiding] allows an ordinary name to hide a non-tagDouglas Gregor2010-10-232-2/+31
| | | | | | | name *in the same scope*, but not across scopes. Implement the highlighted condition. llvm-svn: 117212
* Update remaining attribute macros to new style.Chandler Carruth2010-10-232-5/+3
| | | | llvm-svn: 117204
* Update to use 'LLVM_*' macro names for attributes.Chandler Carruth2010-10-231-2/+2
| | | | llvm-svn: 117201
* Warn if a variable marked with the "unused" attribute is used. Patch by ↵Anders Carlsson2010-10-226-7/+56
| | | | | | Darin Adler! llvm-svn: 117184
* Parse attributes on enumerators and instantiate attributes on enum decls.John McCall2010-10-226-9/+75
| | | | llvm-svn: 117182
* Minor tweak so that fixit-errors.c is never compiled; it crashes and pops up ↵Anders Carlsson2010-10-221-1/+1
| | | | | | a crash dialog on my system. llvm-svn: 117181
* Update compatibility page for objective-c.Fariborz Jahanian2010-10-221-0/+19
| | | | llvm-svn: 117168
* Teach clang_getCursorReferenced() and friends about BlockDeclRefExprs.Douglas Gregor2010-10-223-21/+31
| | | | llvm-svn: 117167
* In the presence of using declarations, we can find the same classDouglas Gregor2010-10-222-30/+94
| | | | | | | | members in class subobjects of different types. So long as the underlying declaration sets are the same, and the declaration sets involve non-instance members, this is not an ambiguity. llvm-svn: 117163
* Fix a horrible bug in all dataflow analyses that use CFGRecStmtVisitor ↵Ted Kremenek2010-10-222-0/+23
| | | | | | | | | (including live variables analysis). We shouldn't recurse into CompoundStmts since they are already inlined in the CFG. This could result in bogus dead stores warnings (among other things). llvm-svn: 117162
* Fix '-analyzer-display-progress' for Objective-C methods. Also remove ↵Ted Kremenek2010-10-221-13/+5
| | | | | | obsolete code. llvm-svn: 117161
* Test emoved.Fariborz Jahanian2010-10-221-0/+0
| | | | llvm-svn: 117160
* After discussion with Doug and John, I am revertingFariborz Jahanian2010-10-225-54/+2
| | | | | | the patch. llvm-svn: 117159
* Change handling of inline asm 'p' constraint to match llvm-gcc.Dale Johannesen2010-10-222-0/+5
| | | | llvm-svn: 117149
* Substantially revise how clang computes the visibility of a declaration toJohn McCall2010-10-2217-312/+555
| | | | | | | | more closely parallel the computation of linkage. This gets us to a state much closer to what gcc emits, modulo bugs, which will undoubtedly arise in abundance. llvm-svn: 117147
* Patch fixes miscompile with non-trivial copy constructors and Fariborz Jahanian2010-10-224-2/+53
| | | | | | statement expressions, //rdar: //8540501 llvm-svn: 117146
* Delay record type's debug info emission, in -flimit-debug-info mode, if ↵Devang Patel2010-10-221-1/+2
| | | | | | member expression's base is call expr. llvm-svn: 117127
* Revert unintentional check-in.Devang Patel2010-10-221-1/+1
| | | | llvm-svn: 117120
* When we perform name lookup for a template, we may end up finding anDouglas Gregor2010-10-222-0/+40
| | | | | | | | ambiguous name where none of the declarations found are actually templates. In this case, make sure we clear out the ambiguous-path data when recomputing the lookup result kind. Fixes PR8439. llvm-svn: 117112
OpenPOWER on IntegriCloud