summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-20/+21
| | | | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: DiagnoseConditionalForNull() CheckConditionalOperands() IsArithmeticBinaryExpr() DiagnoseConditionalPrecedence() llvm-svn: 139167
* Spelling.Benjamin Kramer2011-09-061-7/+7
| | | | llvm-svn: 139165
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-56/+55
| | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: handleIntegerConversion() UsualArithmeticConversions() llvm-svn: 139164
* Don't emit -Wpadded warnings without a valid SourceLocation. This can ↵Ted Kremenek2011-09-061-0/+5
| | | | | | happen when RecordLayoutBuilder is used by Codegen, not Sema. llvm-svn: 139162
* Rearrange code so that we pass the right pointer to delete[] when an ↵Eli Friedman2011-09-061-9/+9
| | | | | | exception is thrown constructing the array elements in an array new expression. Fixes PR10870. llvm-svn: 139158
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-35/+32
| | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: handleFloatConversion() handleComplexIntConvsersion() llvm-svn: 139153
* Rename variables in SemaExpr.cpp to give a more consistant naming scheme.Richard Trieu2011-09-061-23/+24
| | | | | | | | | | | | ExprResult LHS, RHS, Expr *LHSExpr, *RHSExpr QualType LHSType, RHSType Functions changed: handleComplexFloatToComplexFloatConverstion() handleComplexFloatConversion() llvm-svn: 139151
* Advertise support for cxx_range_for as an extension in C++98 mode. Patch by ↵Richard Smith2011-09-061-0/+1
| | | | | | | | Jean-Daniel Dupas! Also provide a modicum of test coverage for ranged for in C++98. llvm-svn: 139149
* Finish implementing (de-)serialization of the CXXDefinitionData bitsDouglas Gregor2011-09-062-0/+8
| | | | | | | needed for implicit move constructors and move assignment operators. Fixes PR10847. llvm-svn: 139144
* When performing a derived-to-base cast on the right-hand side of theDouglas Gregor2011-09-063-12/+10
| | | | | | | | | | | | | | | | synthesized move assignment within an implicitly-defined move assignment operator, be sure to treat the derived-to-base cast as an xvalue (rather than an lvalue). Otherwise, we'll end up getting the wrong constructor. Optimize a direct call to a trivial move assignment operator to an aggregate copy, as we do for trivial copy assignment operators, and update the the assertion in CodeGenFunction::EmitAggregateCopy() to cope with this optimization. Fixes PR10860. llvm-svn: 139143
* Add missing dependencyPeter Collingbourne2011-09-061-0/+1
| | | | | | Spotted by Ninja. llvm-svn: 139129
* Add the resource directory to the search path for Driver::GetFilePath,Peter Collingbourne2011-09-061-3/+8
| | | | | | | | | | | | | | as well as the search path printed by -print-search-dirs. The main purpose of this change is to cause -print-file-name=include to print the path to the include directory under Clang's resource directory, instead of the system compiler's include directory, whose header files Clang may not be able to parse. Some build scripts will do something like: $(CC) -nostdinc -I`$(CC) -print-file-name=include` to exclude all header paths except the compiler's. llvm-svn: 139127
* Speed up BCPL comment lexing by looking aggressively for newlines and then ↵Benjamin Kramer2011-09-051-9/+24
| | | | | | | | scannig backwards to see if the newline is escaped. 3% speedup in preprocessing all of clang with -Eonly. Also includes a small testcase for coverage. llvm-svn: 139116
* Use the Lexer's definition of whitespace here.Benjamin Kramer2011-09-051-3/+2
| | | | llvm-svn: 139115
* Implement the suggested resolution of WG21 N3307 issue 19: When determining ↵Richard Smith2011-09-051-11/+7
| | | | | | whether a class is an aggregate in C++0x, treat all functions which are neither deleted nor defaulted as user-provided, not just special member functions. The wording of the standard only defines the term "user-provided" for special member functions, but the intent seems to be that any function can be user-provided. llvm-svn: 139111
* Pass 0 instead of a empty TemplateArgumentListInfo when creating a ↵Francois Pichet2011-09-041-1/+2
| | | | | | | | CXXDependentScopeMemberExpr to handle a "this->" fixit (lookup into dependent bases of class template) Otherwise the fixit doesn't really work for subsequent lookup. llvm-svn: 139105
* Use const_cast to avoid warnings.Benjamin Kramer2011-09-041-1/+1
| | | | llvm-svn: 139104
* PR10458: Last part of providing 'auto' type specifier as an extension in ↵Richard Smith2011-09-041-1/+5
| | | | | | C++98: permit it within type-ids. llvm-svn: 139103
* PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept ↵Richard Smith2011-09-043-7/+42
| | | | | | for-range and auto with an ExtWarn, and produce a -Wc++0x-compat warning in C++98 mode when auto is used as a storage class. llvm-svn: 139102
* Add test case for defaulted copy and move structure validation.Sebastian Redl2011-09-044-16/+16
| | | | | | | | Fix bug this uncovered. Address minor comments from Doug. Enable cxx_implicit_moves feature. llvm-svn: 139101
* Handle a code-completion token being passed to the macro stringify operator.Argyrios Kyrtzidis2011-09-041-0/+2
| | | | | | Fixes http://llvm.org/PR10826. llvm-svn: 139087
* Support code-completion for C++ inline methods and ObjC buffering methods.Argyrios Kyrtzidis2011-09-0415-179/+250
| | | | | | | | | | | | | | Previously we would cut off the source file buffer at the code-completion point; this impeded code-completion inside C++ inline methods and, recently, with buffering ObjC methods. Have the code-completion inserted into the source buffer so that it can be buffered along with a method body. When we actually hit the code-completion point the cut-off lexing or parsing. Fixes rdar://10056932&8319466 llvm-svn: 139086
* Fix Lexer::ComputePreamble when MaxLines parameter is non-zero.Argyrios Kyrtzidis2011-09-042-4/+20
| | | | | | | | The function was only counting lines that included tokens and not empty lines, but MaxLines (mainly initiated to the line where the code-completion point resides) is a count of overall lines (even empty ones). llvm-svn: 139085
* More unused variable removal.Benjamin Kramer2011-09-031-3/+1
| | | | llvm-svn: 139080
* Make helpers static, remove unused variables.Benjamin Kramer2011-09-033-9/+5
| | | | llvm-svn: 139078
* Teach -Wdangling-field to warn about temporaries bound to references asChandler Carruth2011-09-031-9/+17
| | | | | | | | | | | | | well. Also, clean up the flow of the code a bit, and factor things more nicely. Finally, add the test case that was missing from my previous commit (sorry), with new tests added to cover temporaries and other fun cases. llvm-svn: 139077
* Add a simple new warning to catch blatantly dangling pointer andChandler Carruth2011-09-031-2/+51
| | | | | | | | | | | | | | | | | reference members of classes. We've had several bugs reported because of this, and there's no reason not to flag it right away in the compiler. Comments especially welcome on the strategy for implementing this warning (IE, what should trigger this?) and on the text of the warning itself. I'm going to extend this to cover obvious cases with temporaries and beef up the test cases some in subsequent patches. I'll then run it over a large codebase and make sure its not misbehaving before I add it to -Wall or turn it on by default. I think this one might be a good candidate for on by default. llvm-svn: 139075
* Fix some indenting issues in SemaExpr.cppRichard Trieu2011-09-021-4/+3
| | | | llvm-svn: 139042
* blocks: Support capturing complex variable in block.Fariborz Jahanian2011-09-021-0/+1
| | | | | | // rdar://10033896 llvm-svn: 139041
* Refactor UsualArithmeticConversions() in SemaExpr.cpp into several functions.Richard Trieu2011-09-021-251/+291
| | | | llvm-svn: 139033
* revert patch in r139020Fariborz Jahanian2011-09-021-1/+5
| | | | llvm-svn: 139029
* -Wuninitialized: fix insidious bug resulting from interplay of blocks and ↵Ted Kremenek2011-09-021-17/+14
| | | | | | dead code. Fixes <rdar://problem/10060250>. llvm-svn: 139027
* blocks: Support capturing complex variable in block.Fariborz Jahanian2011-09-021-5/+1
| | | | | | // rdar://10033896 llvm-svn: 139020
* Make StmtDumper::VisitCXXFunctionalCastExpr dump the attached cast kind. ↵Eli Friedman2011-09-022-4/+6
| | | | | | Fix the cast kind for a cast from floating-point to enum type. (The difference isn't actually visible, but that's just because IRGen is overly forgiving.) Per report by Enea Zaffanella on cfe-dev. llvm-svn: 139011
* [analyzer] Remove TransferFuncs.h, then deal with the fallout.Jordy Rose2011-09-0214-6/+12
| | | | | | And with that, TransferFuncs is gone! llvm-svn: 139003
* [analyzer] Move RetainReleaseChecker to the Checkers library and rename it ↵Jordy Rose2011-09-023-256/+208
| | | | | | to RetainCountChecker...and clean up the file while I'm at it. llvm-svn: 139002
* Hoist the emission of parseable fixits into a helper method, simplifyingChandler Carruth2011-09-021-38/+38
| | | | | | and reducing indentation through the clever use of early exits. ;] llvm-svn: 139001
* [analyzer] Remove lingering CFRefCount creation, which would have resulted ↵Jordy Rose2011-09-021-12/+3
| | | | | | in a leak. There's room for improvement here... llvm-svn: 139000
* [analyzer] Fix member initialization order. No functionality change.Jordy Rose2011-09-021-1/+1
| | | | llvm-svn: 138999
* [analyzer] Move the knowledge of whether or not GC is enabled for the ↵Jordy Rose2011-09-024-130/+118
| | | | | | | | | | current analysis from CFRefCount to ExprEngine. Remove TransferFuncs from ExprEngine and AnalysisConsumer. Demote RetainReleaseChecker to a regular checker, and give it the name osx.cocoa.RetainCount (class name change coming shortly). Update tests accordingly. llvm-svn: 138998
* Move the warning for different enum comparisons and the warning for using ↵Richard Trieu2011-09-021-61/+88
| | | | | | NULL as a non-pointer in a binary operation into separate functions. llvm-svn: 138995
* Reduce code duplication for pointer comparisons in CheckCompareOperands().Richard Trieu2011-09-021-72/+84
| | | | llvm-svn: 138994
* Pull out incomplete pointer type checking code, used from arithmetic ↵Richard Trieu2011-09-021-24/+22
| | | | | | checking functions, into its own function. llvm-svn: 138993
* Refactor CheckConditionalOperands() by moving chunks of code to helper ↵Richard Trieu2011-09-021-163/+227
| | | | | | functions making a slimmer function. llvm-svn: 138992
* Refactor CheckAddressOfOperand() by pulling out redundant code and moving ↵Richard Trieu2011-09-021-9/+14
| | | | | | hard coding strings from SemaExpr.cpp to DiagnosticSemaKinds.td. llvm-svn: 138987
* Always construct an ASTReader with a non-NULL ASTContext andDouglas Gregor2011-09-024-31/+6
| | | | | | | | | Preprocessor, eliminating the constructor that was used by ASTUnit (which didn't provide an ASTContext or Prepreprocessor). Ensuring that both objects are non-NULL will simplify module loading (but none of that is done yet). llvm-svn: 138986
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-0241-221/+238
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* Allow the preprocessor to be constructed without performing target-Douglas Gregor2011-09-014-80/+115
| | | | | | | | and language-specific initialization. Use this to allow ASTUnit to create a preprocessor object *before* loading the AST file. No actual functionality change. llvm-svn: 138983
* Refactor CheckAdditionOperands(), CheckSubtractionOperands(), and ↵Richard Trieu2011-09-011-21/+29
| | | | | | CheckIncrementDecrementOperand() in SemaExpr.cpp to move reused code to separate functions. llvm-svn: 138975
* Don't try keeping a 'LeadingEmptyMacroLoc' in NullStmt. This failsArgyrios Kyrtzidis2011-09-015-9/+6
| | | | | | in the face of buffering C++/ObjC method bodies. llvm-svn: 138972
OpenPOWER on IntegriCloud