summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Add CXCursor support for C++ namespaces.Ted Kremenek2010-05-063-2/+11
| | | | llvm-svn: 103211
* It turns out that we should be allowing redeclarations within functionDouglas Gregor2010-05-062-2/+18
| | | | | | scope. Thanks to Steven Watanabe for correcting me. llvm-svn: 103210
* Do not give implicitly-defined virtual members functionsDouglas Gregor2010-05-062-2/+22
| | | | | | | | | | | | | available_externally linkage, since they may not have been given a strong definition in another translation unit. Without this patch, the following test case fails to link with a GCC-compiled libstdc++: #include <sstream> int main() { std::basic_stringbuf<char> bs; } Fixes the last problem with the Boost.IO library. llvm-svn: 103208
* Fix typo in comment; 80 col violationDouglas Gregor2010-05-061-3/+3
| | | | llvm-svn: 103204
* The global variable for the VTT might not have external linkage; allowDouglas Gregor2010-05-062-2/+10
| | | | | | | us to find local variables, too. Fixes the last remaining Boost.Rational failure. llvm-svn: 103203
* mention that cmake works on unix too. PR7061Chris Lattner2010-05-061-0/+5
| | | | llvm-svn: 103202
* ignore *.orig when installing, patch by Brooks Davis!Chris Lattner2010-05-061-1/+1
| | | | llvm-svn: 103200
* Fixed DISABLE_SMART_POINTERS breakageDouglas Gregor2010-05-066-16/+27
| | | | llvm-svn: 103198
* Handle -ffunction-sections and -fdata-sections in the driver.Rafael Espindola2010-05-062-0/+5
| | | | llvm-svn: 103197
* Basic: Update getClangRepositoryPath for my change to integration branch layout.Daniel Dunbar2010-05-061-1/+2
| | | | llvm-svn: 103192
* Diagnose deprecated/unavailable functions selected by overload resolution.John McCall2010-05-063-3/+147
| | | | | | Fixes rdar://problem/4232969, or at least the clang parts of it. llvm-svn: 103191
* Try to work around a Visual C++ bug with copy-assignment.Douglas Gregor2010-05-061-1/+1
| | | | llvm-svn: 103190
* Rework our handling of temporary objects within the conditions ofDouglas Gregor2010-05-0611-123/+290
| | | | | | | | | | | | | | | | | | | if/switch/while/do/for statements. Previously, we would end up either: (1) Forgetting to destroy temporaries created in the condition (!), (2) Destroying the temporaries created in the condition *before* converting the condition to a boolean value (or, in the case of a switch statement, to an integral or enumeral value), or (3) In a for statement, destroying the condition's temporaries at the end of the increment expression (!). We now destroy temporaries in conditions at the right times. This required some tweaking of the Parse/Sema interaction, since the parser was building full expressions too early in many places. Fixes PR7067. llvm-svn: 103187
* Code Gen support for Getter/Setter synthesis of Fariborz Jahanian2010-05-062-3/+43
| | | | | | C++ object properties. (still radar 7468090). llvm-svn: 103182
* Reverted part of r103177 (repositioning of clang-builtin include/)mike-m2010-05-061-18/+20
| | | | | | which breaks clang-i686-xp-msvc9 test-clang. llvm-svn: 103180
* Reposition clang-builtin include/ to immediately precede /usr/include/,mike-m2010-05-061-64/+78
| | | | | | | | | | matching gcc compiler. Fixes #include_next <...> shenanigans that lead to file-not-found failures with <cstddef> on libstdc++ 4.3.[012]. Updated C++ include header search paths for various Debian/Ubuntu and Fedora linux distros. llvm-svn: 103177
* Push TypeSourceInfo::getTypeLoc() into a header file so that it'sJohn McCall2010-05-063-6/+7
| | | | | | | | inlineable. That header file has to be TypeLoc.h, which means that TypeLoc.h needs to depend on Decl.h because TypeSourceInfo doesn't have its own header. That could be remedied, though. llvm-svn: 103176
* Kill a never-defined, never-used member function. Thanks, Enea.John McCall2010-05-061-2/+0
| | | | llvm-svn: 103175
* Rearchitect -Wconversion and -Wsign-compare. Instead of computing themJohn McCall2010-05-0611-162/+321
| | | | | | | | | | | | | | "bottom-up" when implicit casts and comparisons are inserted, compute them "top-down" when the full expression is finished. Makes it easier to coordinate warnings and thus implement -Wconversion for signedness conversions without double-warning with -Wsign-compare. Also makes it possible to realize that a signedness conversion is okay because the context is performing the inverse conversion. Also simplifies some logic that was trying to calculate the ultimate comparison/result type and getting it wrong. Also fixes a problem with the C++ explicit casts which are often "implemented" in the AST with a series of implicit cast expressions. llvm-svn: 103174
* Remember the number of positive and negative bits used by the enumerators ofJohn McCall2010-05-066-5/+60
| | | | | | | an enum in the enum decl itself. Use some spare bits from TagDecl for this purpose. llvm-svn: 103173
* simplify EmitAggMemberInitializer a bit and make it work in 32-bit mode,Chris Lattner2010-05-062-6/+29
| | | | | | fixing PR7063. llvm-svn: 103171
* add todos for isinf_sign and isnormal, which I don't intend to implementChris Lattner2010-05-061-1/+8
| | | | | | in the near future. llvm-svn: 103169
* implement codegen support for __builtin_isfinite, part of PR6083Chris Lattner2010-05-062-2/+21
| | | | llvm-svn: 103168
* optimize builtin_isnan/isinf to not do an extraneous extension fromChris Lattner2010-05-062-1/+32
| | | | | | | float -> double (which happens because they are modelled as int(...) functions), and add a testcase for isinf. llvm-svn: 103167
* implement part of PR6083: codegen support for isinf. Like isnan,Chris Lattner2010-05-061-1/+35
| | | | | | | this is generating correct but suboptimal (extra extend to double) code for the float case. Will investigate next. llvm-svn: 103166
* Mark a variable as used in the absence of asserts to silence a GCC warning.Chandler Carruth2010-05-061-0/+1
| | | | llvm-svn: 103165
* Remove a dependency on Frontend headers in the Driver library. Also savesChandler Carruth2010-05-062-15/+10
| | | | | | | building and passing arguments to cc1 layer when setting values to their defaults. llvm-svn: 103162
* Turn -analyzer-inline-call on for C functions. This also fixed a bug thatZhongxing Xu2010-05-066-8/+34
| | | | | | after inlining post-call checking shouldn't be done. llvm-svn: 103161
* Make -analyzer-inline-call not a separate analysis. Instead it's a boolean Zhongxing Xu2010-05-067-8/+15
| | | | | | | flag now, and can be used with other analyses. Only turned it on for C++ methods for now. llvm-svn: 103160
* Partial and full specializations of a class template may have aDouglas Gregor2010-05-068-25/+47
| | | | | | | | | different tag kind ("struct" vs. "class") than the primary template, which has an affect on access control. Should fix the last remaining Boost.Accumulors failure. llvm-svn: 103144
* Workaround a really serious caching bug in ↵Ted Kremenek2010-05-063-0/+12
| | | | | | | | | | SourceManager::isBeforeInTranslationUnit() where the method will sometimes return different results for the same input SourceLocations. I haven't unraveled this method completely yet, so this truly is a workaround until a better fix comes along. llvm-svn: 103143
* Clean up the {} and else placement. This fixes an ambiguous else as well asChandler Carruth2010-05-061-6/+6
| | | | | | picking a more consistent pattern. llvm-svn: 103142
* Silence a pedantic GCC warning by making the grouping of && and || explicit.Chandler Carruth2010-05-061-4/+4
| | | | llvm-svn: 103141
* Add IgnoreParenImpCasts() to Expr, which is basically like IgnoreParenCastsJohn McCall2010-05-052-1/+19
| | | | | | | | | except it only skips implicit casts. Also fix ObjCImplicitGetterSetterRefExpr's child_begin to skip the base expression if it's actually a type reference (which you get with static property references). llvm-svn: 103132
* Pass the globaldecl into GetOrCreateLLVMFunction so that llvmChris Lattner2010-05-052-2/+31
| | | | | | | | | function attributes like byval get applied to the function definition. This fixes PR7058 and makes i386 llvm/clang bootstrap pass all the same tests as x86-64 bootstrap for me (the llvmc tests still fail in both). llvm-svn: 103131
* When implicit definition of the copy-assignment operator fails,Douglas Gregor2010-05-052-14/+18
| | | | | | | | | provide a note that shows where the copy-assignment operator was needed. We used to have this, but I broke it during refactoring. Finishes PR6999. llvm-svn: 103127
* This patch deals with Sema Part of Setter/Getter synthesisFariborz Jahanian2010-05-059-27/+98
| | | | | | | of properties which are of C++ objects. Code Gen to follow (Radar 7468090). llvm-svn: 103123
* When we emit a non-constant initializer for a global variable ofDouglas Gregor2010-05-052-2/+32
| | | | | | | | reference type, make sure that the initializer we build is the of the appropriate type for the *reference*, not for the thing that it refers to. Fixes PR7050. llvm-svn: 103115
* Test commit.mike-m2010-05-051-1/+1
| | | | llvm-svn: 103090
* For thread-safe static initialization of local statics withDouglas Gregor2010-05-052-34/+51
| | | | | | | | destructors, place the __cxa_atexit call after the __cxa_guard_release call, mimicking GCC/LLVM-GCC behavior. Noticed while debugging something related. llvm-svn: 103088
* Reapplying patch to change StmtNodes.def to StmtNodes.td, this timeAlexis Hunt2010-05-0514-211/+186
| | | | | | | with no whitespace. This will allow statements to be referred to in attribute TableGen files. llvm-svn: 103087
* Revert r103072; I accidentally ended up deleting a bunch of trailingAlexis Hunt2010-05-0514-643/+668
| | | | | | | whitespace which makes this patch unreadable. Will recommit without the whitespace. llvm-svn: 103086
* Support for 'template' as a disambiguator (PR7030)Douglas Gregor2010-05-054-15/+74
| | | | | | | | | | | | | ParseOptionalCXXScopeSpecifier() only annotates the subset of template-ids which are not subject to lexical ambiguity. Add support for the more general case in ParseUnqualifiedId() to handle cases such as A::template B(). Also improve some diagnostic locations. Fixes PR7030, from Alp Toker! llvm-svn: 103081
* add a new --print-diagnostic-categories option, which causes the driver toChris Lattner2010-05-052-0/+14
| | | | | | | | | | | | | | | print out all of the category numbers with their description. This is useful for clients that want to map the numbers produced by --fdiagnostics-show-category=id to their human readable string form. The output is simple but utilitarian: $ clang --print-diagnostic-categories 1,Format String 2,Something Else This implements rdar://7928193 llvm-svn: 103080
* Reimplement code generation for copying fields in theDouglas Gregor2010-05-056-282/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicitly-generated copy constructor. Previously, Sema would perform some checking and instantiation to determine which copy constructors, etc., would be called, then CodeGen would attempt to figure out which copy constructor to call... but would get it wrong, or poke at an uninstantiated default argument, or fail in other ways. The new scheme is similar to what we now do for the implicit copy-assignment operator, where Sema performs all of the semantic analysis and builds specific ASTs that look similar to the ASTs we'd get from explicitly writing the copy constructor, so that CodeGen need only do a direct translation. However, it's not quite that simple because one cannot explicit write elementwise copy-construction of an array. So, I've extended CXXBaseOrMemberInitializer to contain a list of indexing variables used to copy-construct the elements. For example, if we have: struct A { A(const A&); }; struct B { A array[2][3]; }; then we generate an implicit copy assignment operator for B that looks something like this: B::B(const B &other) : array[i0][i1](other.array[i0][i1]) { } CodeGen will loop over the invented variables i0 and i1 to visit all elements in the array, so that each element in the destination array will be copy-constructed from the corresponding element in the source array. Of course, if we're dealing with arrays of scalars or class types with trivial copy-assignment operators, we just generate a memcpy rather than a loop. Fixes PR6928, PR5989, and PR6887. Boost.Regex now compiles and passes all of its regression tests. Conspicuously missing from this patch is handling for the exceptional case, where we need to destruct those objects that we have constructed. I'll address that case separately. llvm-svn: 103079
* Use a more appropriate LLVM type for the vtable pointer.Anders Carlsson2010-05-052-5/+7
| | | | llvm-svn: 103078
* Unbreak CMake build.Douglas Gregor2010-05-056-4/+9
| | | | llvm-svn: 103077
* fit in 80 colsChris Lattner2010-05-051-3/+6
| | | | llvm-svn: 103075
* Add forgotten CMakeFiles.txtAlexis Hunt2010-05-051-0/+5
| | | | llvm-svn: 103074
* Change StmtNodes.def to StmtNodes.td in anticipation of a rewrite of attributesAlexis Hunt2010-05-0514-668/+643
| | | | llvm-svn: 103072
OpenPOWER on IntegriCloud