summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [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-0230-172/+162
| | | | | | | | | | 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-022-10/+16
| | | | | | hard coding strings from SemaExpr.cpp to DiagnosticSemaKinds.td. llvm-svn: 138987
* Always construct an ASTReader with a non-NULL ASTContext andDouglas Gregor2011-09-025-60/+7
| | | | | | | | | 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-0242-227/+258
| | | | | | | | 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-016-85/+130
| | | | | | | | 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-018-28/+15
| | | | | | in the face of buffering C++/ObjC method bodies. llvm-svn: 138972
* [arcmt] Clear out temporary dirs in the tests or we may get failures because ↵Argyrios Kyrtzidis2011-09-013-0/+3
| | | | | | of leftovers. llvm-svn: 138971
* Don't try to emit unsupported templated friend declarations. They're unsupportedNick Lewycky2011-09-012-2/+15
| | | | | | | and may very well be dependent-types, triggering an assertion in debug info codegen. llvm-svn: 138970
* Extend the self-reference warning to catch when a constructor references ↵Richard Trieu2011-09-014-13/+141
| | | | | | | | | itself upon initialization, such as using itself within its own copy constructor. struct S {}; S s(s); llvm-svn: 138969
* [arcmt] Fix test/ARCMT/remove-statements.m regression due toArgyrios Kyrtzidis2011-09-016-33/+88
| | | | | | | | Objective-C method buffering(rdar://10056942) Turned out the same issue existed for C++ inline methods. llvm-svn: 138960
* Teach ASTContext and Preprocessor to hold on to references to the sameDouglas Gregor2011-09-017-14/+17
| | | | | | | | | LangOptions, rather than making distinct copies of LangOptions. Granted, LangOptions doesn't actually get modified, but this will eventually make it easier to construct ASTContext and Preprocessor before we know all of the LangOptions. llvm-svn: 138959
* default property synthesis is off by defaultFariborz Jahanian2011-09-011-1/+1
| | | | | | for now. llvm-svn: 138958
* Make test slightly trickierDouglas Gregor2011-09-011-0/+3
| | | | llvm-svn: 138957
* objective-c: Make auto synthesis of properties the default.Fariborz Jahanian2011-09-011-1/+1
| | | | | | This concludes //rdar://8843851 llvm-svn: 138947
* Modules hide macro definitions by default, so that silly things likeDouglas Gregor2011-09-0115-49/+184
| | | | | | | | | | | include guards don't show up as macro definitions in every translation unit that imports a module. Macro definitions can, however, be exported with the intentionally-ugly #__export_macro__ directive. Implement this feature by not even bothering to serialize non-exported macros to a module, because clients of that module need not (should not) know that these macros even exist. llvm-svn: 138943
* Enable -fdelayed-template-parsing by default on Win32.Francois Pichet2011-09-016-9/+10
| | | | | | I had to force -fno-delayed-template-parsing on some Index tests because delayed template parsing will change the output of some tests. llvm-svn: 138942
* Fix PR10744 by adding the toolchain path to the regular program pathRafael Espindola2011-09-011-5/+6
| | | | | | | and doing a simple search. Before we would manually check for the linker before the -B options were searched. llvm-svn: 138941
* Add 4.4.6 to GccVersions[] in lib/Driver/ToolChains.cpp.Hans Wennborg2011-09-011-1/+1
| | | | llvm-svn: 138940
* If size was equal to 0, either NULL or a pointer suitable to be passed to Zhongxing Xu2011-09-012-6/+3
| | | | | | | | free() is returned by realloc(). Most code expect NULL. And we only need to transfer one final ProgramState. llvm-svn: 138937
* Fix "multi-line comment" compiler error.Argyrios Kyrtzidis2011-09-011-8/+8
| | | | llvm-svn: 138936
* When defining the implicit move assignment operator, don't performDouglas Gregor2011-09-012-20/+38
| | | | | | | | semantic analysis when taking the address of an xvalue. Instead, just build the unary operator directly, since it's safe to do so (from the IRgen and AST perspectives) for any glvalue. Fixes PR10822. llvm-svn: 138935
* Support importing of ObjC categories from modules.Argyrios Kyrtzidis2011-09-0111-2/+380
| | | | | | | | | | | | The initial incentive was to fix a crash when PCH chaining categories to an interface, but the fix was done in the "modules way" that I hear is popular with the kids these days. Each module stores the local chain of categories and we combine them when the interface is loaded. We also warn if non-dependent modules introduce duplicate named categories. llvm-svn: 138926
* Create a CaretDiagnostic class to hold the logic for emittingChandler Carruth2011-08-312-266/+333
| | | | | | | | | | | | | | (unsurprisingly) caret diagnostics. This is designed to bring some organization to the monstrous EmitCaretDiagnostic function, and allow factoring it more easily and with less mindless parameter passing. Currently this just lifts the existing function into a method, and splits off the obviously invariant arguments to be class members. No functionality is changed, and there are still lots of warts to let existing code continue functioning as-is. Definitely WIP, more cleanups to follow. llvm-svn: 138921
* Sink all of the include stack printing logic into its member function.Chandler Carruth2011-08-311-18/+39
| | | | llvm-svn: 138920
* [analyzer] Revert a regression introduced in r133104(The ARC Migration ↵Anna Zaks2011-08-311-4/+6
| | | | | | Tool..) due to a merge error. llvm-svn: 138919
* Test for default property synthesis.Fariborz Jahanian2011-08-311-0/+118
| | | | llvm-svn: 138917
* objective-c: this patch (re)introduces objective-c's default propertyFariborz Jahanian2011-08-3111-174/+27
| | | | | | | | | | synthesis. This new feature is currently placed under -fobjc-default-synthesize-properties option and is off by default pending further testing. It will become the default feature soon. // rdar://8843851 llvm-svn: 138913
* Switch the "no module found" default-fatal warning to a default-fatal error.Douglas Gregor2011-08-313-4/+3
| | | | llvm-svn: 138909
* Don't assert when diagnosing a missing cast of an unknown-anytypeJohn McCall2011-08-314-5/+22
| | | | | | | | message send to an unknown method. rdar://problem/9416370, redux. llvm-svn: 138893
* [driver] If no -miphoneos-version-min is specified on the command line *and*Chad Rosier2011-08-311-35/+31
| | | | | | | IPHONEOS_DEPLOYMENT_TARGET if undefined, set -miphoneos-version-min based on isysroot. llvm-svn: 138892
* Make sure to initialize field. Hopefully this will fix some test failures ↵Eli Friedman2011-08-311-0/+1
| | | | | | on Windows. llvm-svn: 138880
* Don't verify the name of the driver executable. It's not really releventChandler Carruth2011-08-311-1/+1
| | | | | | | to this test, and doesn't always start with 'clang' when fully resolved on some build systems. llvm-svn: 138878
* [analyzer] Fix varargs helper to only use POD types even for named ↵Jordy Rose2011-08-311-4/+4
| | | | | | arguments. Thanks, Joerg. llvm-svn: 138875
* Switch __import__ over to __import_module__, so we don't conflict withDouglas Gregor2011-08-3113-24/+25
| | | | | | | | existing practice with Python extension modules. Not that Python extension modules should be using a double-underscored identifier anyway, but... llvm-svn: 138870
* objective-c - This patch buffers method implementations Fariborz Jahanian2011-08-3119-53/+136
| | | | | | | | | | | | | and does the Sema on their body after the entire class/category @implementation is seen. This change allows messaging of forward private methods, as well as, access to synthesized ivars of properties with foward synthesize declarations; among others. In effect, this patch removes several restrictions placed on objective-c due to in-place semantics processing of methods. This is part of // rdar://8843851. llvm-svn: 138865
* Update libclang to have APIs corresponding to the new 'expansion' namingChandler Carruth2011-08-312-19/+41
| | | | | | | | | | | system for macro-backed source locations. The old APIs are preserved for legacy users. This was intended to land with the main work of instantiation -> expansion, but despite running it by Doug over a month ago, I forgot to commit it. Very sorry for that... llvm-svn: 138860
* Serialize the new bits in CXXRecordDecl::DefinitionData.Sebastian Redl2011-08-312-4/+8
| | | | llvm-svn: 138855
* Improve the diagnostic text for -Wmissing-noreturn to include the nameChandler Carruth2011-08-317-15/+20
| | | | | | | | | | | | | | of the function in question when applicable (that is, not for blocks). Patch by Joerg Sonnenberger with some stylistic tweaks by me. When discussing this weth Joerg, streaming the decl directly into the diagnostic didn't work because we have a pointer-to-const, and the overload doesn't accept such. In order to make my style tweaks to the patch, I first changed the overload to accept a pointer-to-const, and then changed the diagnostic printing layer to also use a pointer-to-const, cleaning up a gross line of code along the way. llvm-svn: 138854
* Change err_pp_file_not_found back to an Error; when it's a Warning, we ↵Eli Friedman2011-08-308-13/+21
| | | | | | | | suppress it in system headers. And it is not a good idea to suppress it in system headers. (This was originally changed in r134996 to implement -MG.) Fixes <rdar://10041960>. And also brings down the number of warnings without a flag by one :) llvm-svn: 138842
* Allow C99 hexfloats in C++0x mode. This change resolves the standardsDouglas Gregor2011-08-308-31/+64
| | | | | | | | | collision between C99 hexfloats and C++0x user-defined literals by giving C99 hexfloats precedence. Also, warning about user-defined literals that conflict with hexfloats and those that have names that are reserved by the implementation. Fixes <rdar://problem/9940194>. llvm-svn: 138839
* Fix PR10694: Boolean conversions can be from pointers, and those conversionsJeffrey Yasskin2011-08-302-0/+8
| | | | | | aren't considered narrowing conversions. llvm-svn: 138838
* When writing out the entries in a lookup table for a DeclContext, makeDouglas Gregor2011-08-303-6/+36
| | | | | | | | sure that all of the CXXConversionDecls go into the same bucket. Otherwise, name lookup might not find them all. Fixes <rdar://problem/10041960>. llvm-svn: 138824
* Declare and define implicit move constructor and assignment operator.Sebastian Redl2011-08-3021-104/+1635
| | | | | | | | | This makes the code duplication of implicit special member handling even worse, but the cleanup will have to come later. For now, this works. Follow-up with tests for explicit defaulting and enabling the __has_feature flag to come. llvm-svn: 138821
* Remove a few mutating ObjCCategoryDecl methods.Argyrios Kyrtzidis2011-08-305-42/+41
| | | | | | | | | | | Remove -setClassInterface -setNextClassCategory -insertNextClassCategory and combine them in the Create function. llvm-svn: 138817
OpenPOWER on IntegriCloud