summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Capitialize paramater names in SemaExpr.cpp and resolve any parameter name ↵Richard Trieu2011-09-091-345/+345
| | | | | | conflicts between declarations and definitions from this and previous refactorings. llvm-svn: 139346
* The integer type of an enumeration type isn't always canonicalDouglas Gregor2011-09-081-1/+1
| | | | llvm-svn: 139334
* Remove WCHAR_MIN and WCHAR_MAX from limits.h. According to posix and c99Eric Christopher2011-09-081-14/+0
| | | | | | | | these should be in stdint.h - and they already are. Fixes rdar://10097036. llvm-svn: 139332
* Thread safety: small edit to unused variation on warning left in by accident ↵Caitlin Sadowski2011-09-081-2/+1
| | | | | | from earlier commit llvm-svn: 139331
* Extend -Wliteral-conversion to catch "int i = -1.234"Matt Beaumont-Gay2011-09-081-0/+5
| | | | llvm-svn: 139326
* Thread Safety: In C++0x Mutexes are the objects that control access to ↵Caitlin Sadowski2011-09-081-90/+80
| | | | | | shared variables, while Locks are the objects that acquire and release Mutexes. We switch to this new terminology. llvm-svn: 139321
* Thread Safety: adding basic no thread safety analysis optionCaitlin Sadowski2011-09-081-0/+2
| | | | llvm-svn: 139310
* Thread safety: Adding basic support for locks required and excluded attributesCaitlin Sadowski2011-09-081-2/+51
| | | | llvm-svn: 139308
* Thread safety: shared vs. exclusive locksCaitlin Sadowski2011-09-081-64/+152
| | | | llvm-svn: 139307
* Look through SubstNonTypeTemplateParmExpr nodes in the variousDouglas Gregor2011-09-081-1/+20
| | | | | | Expr::Ignore* methods that also look through implicit casts. llvm-svn: 139303
* Thread safety: added support for function scopes in attribute arguments.Caitlin Sadowski2011-09-084-2/+53
| | | | | | This patch was written by DeLesley Hutchins. llvm-svn: 139302
* Thread Safety: Patch to implement delayed parsing of attributes within aCaitlin Sadowski2011-09-085-146/+292
| | | | | | | | class scope. This patch was also written by DeLesley Hutchins. llvm-svn: 139301
* [libclang] Fix annotation and getting a "macro expansion" cursorArgyrios Kyrtzidis2011-09-083-10/+19
| | | | | | for a builtin macro expansion. llvm-svn: 139298
* Allow C++0x enumerations with a fixed underlying type inDouglas Gregor2011-09-083-6/+19
| | | | | | | Objective-C. The @encode'ing of such an enumeration type is the same as its underlying type. <rdar://problem/5276348>. llvm-svn: 139297
* Formatting.Eric Christopher2011-09-081-1/+2
| | | | llvm-svn: 139296
* Added missing initialization.Abramo Bagnara2011-09-081-0/+2
| | | | llvm-svn: 139291
* Adding FixIts to static/inline main declaration diagnostics.David Blaikie2011-09-081-35/+36
| | | | llvm-svn: 139282
* Implement the Objective-C 'instancetype' type, which is an alias ofDouglas Gregor2011-09-089-19/+76
| | | | | | | | | | 'id' that can be used (only!) via a contextual keyword as the result type of an Objective-C message send. 'instancetype' then gives the method a related result type, which we have already been inferring for a variety of methods (new, alloc, init, self, retain). Addresses <rdar://problem/9267640>. llvm-svn: 139275
* [driver] i386 kext preprocessor jobs also need their unsupported options Chad Rosier2011-09-081-0/+2
| | | | | | | filtered. This happenis when -save-temps is specified. <rdar://problem/10088387> llvm-svn: 139269
* Optimize the preprocessor's handling of the __import_module__Douglas Gregor2011-09-073-17/+42
| | | | | | | | | | | | keyword. We now handle this keyword in HandleIdentifier, making a note for ourselves when we've seen the __import_module__ keyword so that the next lexed token can trigger a module import (if needed). This greatly simplifies Preprocessor::Lex(), and completely erases the 5.5% -Eonly slowdown Argiris noted when I originally implemented __import_module__. Big thanks to Argiris for noting that horrible regression! llvm-svn: 139265
* Change diagnoseAddressOfInvalidType() to use an enum to determine what error ↵Richard Trieu2011-09-071-9/+19
| | | | | | message to display. Also, move the function call into on location instead of having it spread among many places in the if/else statements. llvm-svn: 139260
* When parsing a function-try-block that does not have aDouglas Gregor2011-09-071-1/+3
| | | | | | | | ctor-initializer, remember to call the Sema action to generate default ctor-initializers. What a delightful little miscompile. Fixes PR10578 / <rdar://problem/9877267>. llvm-svn: 139253
* Fix Sema::CorrectTypo to ignore found but unresolved symbolsKaelyn Uhrain2011-09-071-2/+2
| | | | llvm-svn: 139252
* More missing dependencies picked up by Ninja.Peter Collingbourne2011-09-071-0/+4
| | | | llvm-svn: 139248
* objc-gc: More sema work for properties declared 'weak'Fariborz Jahanian2011-09-071-6/+13
| | | | | | in GC mode. // rdar://10073896 llvm-svn: 139235
* Extract the emission of the diagnostic's location into a separateChandler Carruth2011-09-071-103/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | function. This is really the beginning of the second phase of refactorings here. The end goal is to have (roughly) three interfaces: 1) Base class to format a single diagnostic suitable for display on the console. 2) Extension of the base class which also displays a caret diagnostic suitable for display on the console. 3) An adaptor that implements the DiagnosticClient by delegating to #1 and/or #2 as appropriate. Once we have these, things like libclang's formatDiagnostic can use #1 and #2 to provide really well formatted (and consistently formatted!) textual formatting of diagnostics. Getting there is going to be quite a bit of shuffling. I'm basically sketching out where the interface boundaries can be drawn for #1 and #2 within the existing classes. That lets me shuffle with a minimum of fuss and delta. Once that's done, and any of the related interfaces that need to change are updated, I'll hoist these into separate headers and re-implement libclang in terms of their interfaces. Long WIP, but comments at each step welcome. =D llvm-svn: 139228
* Move the HilightRange method from TextDiagnosticPrinter down toChandler Carruth2011-09-071-81/+79
| | | | | | | CaretDiagnostic. It's completely generic, with nothing to do with the diagnostic client or info APIs. llvm-svn: 139227
* Hoist the tab expansion into a helper function.Chandler Carruth2011-09-071-21/+25
| | | | llvm-svn: 139226
* Don't compute the same line number in two places, once inside a loop.Chandler Carruth2011-09-071-12/+8
| | | | llvm-svn: 139225
* Make sure the FunctionDecl's created by "#pragma weak" have correct ↵Eli Friedman2011-09-071-8/+31
| | | | | | ParmVarDecl's. PR10878. llvm-svn: 139224
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-071-26/+28
| | | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: DiagnoseLogicalAndInLogicalOrLHS() DiagnoseBinOpPrecedence() ActOnBinOp() BuildBinOp() llvm-svn: 139219
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-071-73/+75
| | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CreateBuiltinBinOp() DiagnoseBitwisePrecedence() llvm-svn: 139218
* Switch the CharSourceRange array to a small vector. The array wasChandler Carruth2011-09-071-39/+34
| | | | | | | | | | | | a stack array of a magical size with an assert() that we never overflowed it. That seems incredibly risky. We also have a very nice API for bundling up a vector we expect to usually have a small size without loss of functionality or security if the size is excessive. The fallout is to remove the last pointer+size parameter pair that are traced through the recursive caret diagnostic emission. llvm-svn: 139217
* Switch clang over to using fence/atomicrmw/cmpxchg instead of the intrinsics ↵Eli Friedman2011-09-071-65/+40
| | | | | | | | | | (which will go away). LLVM CodeGen does almost exactly the same thing with these and the old intrinsics, so I'm reasonably confident this will not break anything. There are still a few issues which need to be resolved with code generation for atomic load and store, so I'm not converting the places which need those for now. I'm not entirely sure what to do about __builtin_llvm_memory_barrier: the fence instruction doesn't expose all the possibilities which can be expressed by __builtin_llvm_memory_barrier. I would appreciate hearing from anyone who is using this intrinsic. llvm-svn: 139216
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-071-43/+43
| | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckAssignmentOperands() DiagnoseSelfAssignment() checkArithmeticNull() llvm-svn: 139215
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-071-53/+53
| | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckVectorCompareOperands() CheckBitwiseOperands() CheckLogicalOperands() llvm-svn: 139214
* Change the self-reference visitor (which gives the warning for ↵Richard Trieu2011-09-071-0/+1
| | | | | | | | self-reference oninitalization warning of -Wuninitialized) to exclude member variables that can decay into pointers. This will cause it to no longer warn on this code: struct foo { char a[100], *e; } bar = { .e = bar.a }; llvm-svn: 139213
* objc-gc: Don't force a __strong type'd propertyFariborz Jahanian2011-09-071-1/+1
| | | | | | | to be 'weak'. This prevents a crash and should probably be flagged as error - later to come. llvm-svn: 139211
* In Microsoft mode, if we are inside a template class member function and we ↵Francois Pichet2011-09-072-1/+16
| | | | | | | | can't resolve a function call then create a type-dependent CallExpr even if the function has no type dependent arguments. The goal is to postpone name lookup to instantiation time to be able to search into type dependent base classes. With this patch in, clang will generate only 37 errors (down from 212) when parsing a typical MFC source file. llvm-svn: 139210
* [driver] When clang crashes, don't try to generate diagnostics (i.e., Chad Rosier2011-09-061-0/+17
| | | | | | preprocessor output) with multiple -arch options. llvm-svn: 139207
* objc-gc: Adds support for "weak" property attribute under GC.Fariborz Jahanian2011-09-061-0/+6
| | | | | | // rdar://10073896 llvm-svn: 139203
* Remove the doxyment for this now defunct parameter.Chandler Carruth2011-09-061-1/+0
| | | | llvm-svn: 139197
* Don't recompute the presumed loc twice in 5 lines of code... Spotted byChandler Carruth2011-09-061-1/+1
| | | | | | inspection. llvm-svn: 139196
* Use ArrayRef for the fixit hint array rather than a pointer and a size.Chandler Carruth2011-09-061-35/+34
| | | | | | | Clean up loops over the hints to use the more idiomatic iterator form in LLVM and Clang. llvm-svn: 139195
* Hoist the construction of the FixItHint line into a member function withChandler Carruth2011-09-061-64/+79
| | | | | | | | | | | | a defined interface. This isn't as nice as the previous one, but should get better as I push through better data types in all these functions. Also, I'm hoping to pull some aspects of this out into a common routine (such as tab expansion). Again, WIP, comments welcome as I'm going through. llvm-svn: 139190
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-99/+101
| | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: CheckCompareOperands() llvm-svn: 139187
* When extracting the callee declaration from a call expression, be sureDouglas Gregor2011-09-062-8/+10
| | | | | | | | | | to look through SubstNonTypeTemplateParmExprs. Then, update the IR generation of CallExprs to actually use CallExpr::getCalleeDecl() rather than attempting to mimick its behavior (badly). Fixes <rdar://problem/10063539>. llvm-svn: 139185
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-23/+23
| | | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: checkEnumComparison() diagnoseDistinctPointerComparison() convertPointersToCompositeType() diagnoseFunctionPointerToVoidComparison() llvm-svn: 139184
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-36/+36
| | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: DiagnoseBadShiftValues() CheckShiftOperands() llvm-svn: 139183
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-55/+57
| | | | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: diagnoseArithmeticOnTwoVoidPointers() checkArithmeticBinOpPointerOperands() diagnosePointerIncompatibility() CheckAdditionOperands() CheckSubtractionOperands() llvm-svn: 139182
OpenPOWER on IntegriCloud