summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix marking of virtual members for nested classes whose first non-pure ↵Douglas Gregor2010-01-065-50/+102
| | | | | | virtual function has a body inlined in the class llvm-svn: 92855
* Fix for PR5691David Chisnall2010-01-061-1/+1
| | | | llvm-svn: 92846
* Make sure that the key-function computation produces the correctDouglas Gregor2010-01-062-10/+38
| | | | | | | | result for a nested class whose first non-pure virtual member function has an inline body. Previously, we were checking for the key function before we had seen the (delayed) inline body. llvm-svn: 92839
* Improve the diagnostics used to report implicitly-generated class membersJohn McCall2010-01-0632-75/+117
| | | | | | | | | as parts of overload sets. Also, refer to constructors as 'constructors' rather than functions. Adjust a lot of tests. llvm-svn: 92832
* Fix (invalid) may-be-uninitialized warning.Daniel Dunbar2010-01-061-1/+2
| | | | llvm-svn: 92828
* Add missing CINDEX_LINKAGE.Daniel Dunbar2010-01-061-4/+5
| | | | llvm-svn: 92827
* Add _clang_getDeclExtent to export list.Daniel Dunbar2010-01-061-0/+1
| | | | llvm-svn: 92825
* Significantly rework the calculation of effective integer-expression rangesJohn McCall2010-01-063-176/+280
| | | | | | | | | | | | for -Wsign-compare and -Wconversion, and use that coordinated logic to drive both diagnostics. The new logic works more transparently with implicit conversions, conditional operators, etc., as well as bringing -Wconversion's ability to deal with pseudo-closed operations (e.g. arithmetic on shorts) to -Wsign-compare. Fixes PRs 5887, 5937, 5938, and 5939. llvm-svn: 92823
* Revert my available_externally vtables experiment. It's breaking the ↵Douglas Gregor2010-01-062-3/+8
| | | | | | LLVM-with-Clang build with linker errors that I have yet to investigate. llvm-svn: 92822
* Make our marking of virtual members functions in a class beDouglas Gregor2010-01-067-69/+66
| | | | | | | | | | | | | | | | | | | | | deterministic and work properly with templates. Once a class that needs a vtable has been defined, we now do one if two things: - If the class has no key function, we place the class on a list of classes whose virtual functions will need to be "marked" at the end of the translation unit. The delay until the end of the translation unit is needed because we might see template specializations of these virtual functions. - If the class has a key function, we do nothing; when the key function is defined, the class will be placed on the aforementioned list. At the end of the translation unit, we "mark" all of the virtual functions of the classes on the list as used, possibly causing template instantiation and other classes to be added to the list. This gets LLVM's lib/Support/CommandLine.cpp compiling again. llvm-svn: 92821
* Add enhanced crash reporter breadcrumbs for ↵Ted Kremenek2010-01-061-0/+54
| | | | | | clang_createTranslationUnitFromSourceFile(). llvm-svn: 92820
* Reorder to avoid invalidating idx which is an accessor into VCall.Mike Stump2010-01-061-1/+1
| | | | llvm-svn: 92819
* Fix spelling.Mike Stump2010-01-061-1/+1
| | | | llvm-svn: 92816
* Per offline discussion with Doug, don't perform typo correction when we have ↵Ted Kremenek2010-01-061-0/+4
| | | | | | encountered a fatal error. On some files that are woefully wrong (missing headers) this can cause a 3x slowdown in some cases when parsing the file. It makes sense not to perform typo correction in this case because after a fatal error diagnostics will either be suppressed or not really make any sense. llvm-svn: 92809
* Do not diagnose method disguised as property setterFariborz Jahanian2010-01-062-2/+17
| | | | | | for a 'readonly' property. Fixes radar 7427072. llvm-svn: 92808
* Add Expr::EvaluateAsBooleanCondition(), which does unprincipled folding toJohn McCall2010-01-052-1/+14
| | | | | | | try to evaluate an expression as a constant boolean condition. This has the same intended semantics as used in folding conditional operators. llvm-svn: 92805
* Remove unused variables.Ted Kremenek2010-01-051-2/+0
| | | | llvm-svn: 92804
* Remove deprecated function 'clang_getDeclSource()'. Use ↵Ted Kremenek2010-01-053-9/+0
| | | | | | 'clang_getDeclFile()' instead. llvm-svn: 92803
* Add C API hook 'clang_getDeclExtent()', which returns the source extent of a ↵Ted Kremenek2010-01-055-46/+107
| | | | | | declaration. This implements <rdar://problem/7280072>. llvm-svn: 92802
* Fixed a bug where initializer is a macro in rewrite.Fariborz Jahanian2010-01-051-0/+1
| | | | llvm-svn: 92801
* Split (mostly nonexistent) USR code out from the main CIndex logic.Ted Kremenek2010-01-055-33/+52
| | | | llvm-svn: 92789
* Silence bogus GCC warningDouglas Gregor2010-01-051-1/+2
| | | | llvm-svn: 92787
* Fix -plugin command line argument syntax for clang -cc1 change.Daniel Dunbar2010-01-051-1/+1
| | | | llvm-svn: 92780
* Make use of available_externally linkage for vtables when theDouglas Gregor2010-01-052-4/+56
| | | | | | | | | | non-inline key function of a class template instantiation, when no key function is present, the class template instantiation itself was instantiated with an explicit instantiation declaration (aka extern template). I'm fairly certain that the C++0x specification gives us this lattitude, although GCC doesn't take advantage of it. llvm-svn: 92779
* Add back #include of 'cstdio' to hopefully unbreak the build on Linux.Ted Kremenek2010-01-051-0/+3
| | | | llvm-svn: 92765
* Split code in CIndex.cpp into multiple source files, and remove some ↵Ted Kremenek2010-01-055-473/+543
| | | | | | unnecessary #includes. llvm-svn: 92756
* API support for __block variables which are also __weak.Fariborz Jahanian2010-01-051-5/+16
| | | | llvm-svn: 92755
* Improve key-function computation for templates. In particular:Douglas Gregor2010-01-058-37/+115
| | | | | | | | | | | | | | | | - All classes can have a key function; templates don't change that. non-template classes when computing the key function. - We always mark all of the virtual member functions of class template instantiations. - The vtable for an instantiation of a class template has weak linkage. We could probably use available_externally linkage for vtables of classes instantiated by explicit instantiation declarations (extern templates), but GCC doesn't do this and I'm not 100% that the ABI permits it. llvm-svn: 92753
* Add code to skip the emission of available externally functions at -O0. WIP.Mike Stump2010-01-051-0/+10
| | | | llvm-svn: 92749
* Minor clean up.Fariborz Jahanian2010-01-051-6/+3
| | | | llvm-svn: 92746
* Remove bogus "C" from preamble block decls.Steve Naroff2010-01-051-2/+2
| | | | llvm-svn: 92744
* More rewriting of __block APIs. wip.Fariborz Jahanian2010-01-051-26/+40
| | | | llvm-svn: 92742
* Fix <rdar://problem/7490212> clang rewriter: return of the mixed line ↵Steve Naroff2010-01-051-1/+3
| | | | | | | | | | endings, which is related to <rdar://problem/6596843> clang ObjC rewriter: Line endings still mixed in rewrite output This fix was dropped when I integrated the 'objective-rewrite' branch. llvm-svn: 92737
* Move test case to a more appropriate file.Zhongxing Xu2010-01-052-9/+10
| | | | llvm-svn: 92725
* Add test case.Zhongxing Xu2010-01-051-0/+9
| | | | llvm-svn: 92724
* Revert r92318. Instead fix the analyzer: do not call Zhongxing Xu2010-01-052-9/+3
| | | | | | ASTContext::hasSameUnqualifiedType() when one of the type is VariableArrayType. llvm-svn: 92723
* if an arraytype is canonical, then its element is guaranteed to be canonical.Zhongxing Xu2010-01-051-1/+2
| | | | llvm-svn: 92715
* Allow clang to pass -x cl through to compiler driver.Nate Begeman2010-01-052-0/+3
| | | | llvm-svn: 92686
* When emitting member function pointers, use the canonical decl if the member ↵Anders Carlsson2010-01-053-1/+15
| | | | | | function is virtual. Fixes PR5940. llvm-svn: 92680
* Add a radar reference.Mike Stump2010-01-051-0/+1
| | | | llvm-svn: 92678
* Disallow captured arrays in blocks as well. Radar 7438948.Mike Stump2010-01-053-0/+16
| | | | llvm-svn: 92677
* Disallow capturing vlas inside blocks.Mike Stump2010-01-053-1/+19
| | | | llvm-svn: 92676
* Make static analysis support for C++ 'this' expression context-sensitive. ↵Ted Kremenek2010-01-057-42/+130
| | | | | | Essentially treat 'this' as a implicit parameter to the method call, and associate a region with it. llvm-svn: 92675
* fix a bug mike noticed.Chris Lattner2010-01-051-1/+1
| | | | llvm-svn: 92559
* More rewriting of __block objective-c pointer variables. wip.Fariborz Jahanian2010-01-051-5/+80
| | | | llvm-svn: 92558
* Remove stale comment. We already do format string checking for functions ↵Ted Kremenek2010-01-051-3/+0
| | | | | | with the format attribute. llvm-svn: 92553
* Fix warnings.Mike Stump2010-01-051-1/+2
| | | | llvm-svn: 92551
* Remove references to 'Checker' and 'GRTransferFuncs' fromTed Kremenek2010-01-0510-115/+81
| | | | | | | | | | | | GRStateManager. Having these references was an abstraction violation, as they really should only be known about GRExprEngine. This change required adding a new 'ProcessAssume' callback in GRSubEngine. GRExprEngine implements this callback by calling 'EvalAssume' on all registered Checker objects as well as the registered GRTransferFunc object. llvm-svn: 92549
* Move the -Wconversion logic into SemaChecking.cpp. There's a fair amount ofJohn McCall2010-01-043-314/+315
| | | | | | | overlap between this and -Wsign-compare, which is why I want them in the same place. llvm-svn: 92543
* Move the -Wsign-compare logic into SemaChecking.cpp.John McCall2010-01-042-78/+81
| | | | llvm-svn: 92541
OpenPOWER on IntegriCloud