summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement the suggested resolution to core issue 547, extended to alsoDouglas Gregor2011-01-313-36/+76
| | | | | | | | | allow ref-qualifiers on function types used as template type arguments. GNU actually allows cv-qualifiers on function types in many places where it shouldn't, so we currently categorize this as a GNU extension. llvm-svn: 124584
* Warn if the class has virtual methods but non-virtual destructor. Addresses ↵Argyrios Kyrtzidis2011-01-311-0/+8
| | | | | | rdar://8756445. llvm-svn: 124582
* Don't warn that variables in C++ static member functions shadow fields. ↵Argyrios Kyrtzidis2011-01-311-0/+6
| | | | | | Fixes rdar://8900456. llvm-svn: 124581
* Fix the diagnostic when we are shadowing an external variable and there ↵Argyrios Kyrtzidis2011-01-311-13/+24
| | | | | | exists a locally scoped extern with the same name. llvm-svn: 124580
* Diagnose if extern local variable is followed by non-extern and vice-versa.Argyrios Kyrtzidis2011-01-311-0/+14
| | | | llvm-svn: 124579
* 'extern' variables in functions don't shadow externs in global scope. Fixes ↵Argyrios Kyrtzidis2011-01-311-0/+13
| | | | | | rdar://8883302. llvm-svn: 124578
* If there were errors, disable 'unused' warnings since they will mostly be noise.Argyrios Kyrtzidis2011-01-311-19/+23
| | | | | | Fixes rdar://8736362. llvm-svn: 124577
* Error for use of field from anonymous struct or union should say "invalid ↵Argyrios Kyrtzidis2011-01-311-1/+1
| | | | | | | | use of nonstatic data member" not "call to non-static member function without an object argument". llvm-svn: 124576
* Amazing that there are still issues with the fields of anonymous struct/unions..Argyrios Kyrtzidis2011-01-312-14/+50
| | | | | | Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236. llvm-svn: 124575
* Allow Microsoft attributes in a constructor's parameter list.Francois Pichet2011-01-311-0/+4
| | | | | | This fixes a few compile errors when parsing <regex> from MSVC 2008 with clang. llvm-svn: 124573
* When building with optimizations, emit vtables where the key is not in the Anders Carlsson2011-01-304-1/+75
| | | | | | | | | | | | | | | | | | | | | | | current translation unit as available_externally. This helps devirtualize the second example in PR3100, comment 18: struct S { S() {}; virtual void xyzzy(); }; inline void foo(S *s) { s->xyzzy(); } void bar() { S s; foo(&s); } This involved four major changes: 1. In DefineUsedVTables, always mark virtual member functions as referenced for non-template classes and class template specializations. 2. In CodeGenVTables::ShouldEmitVTableInThisTU return true if optimizations are enabled, even if the key function is not implemented in this translation unit. We don't ever do this for code compiled with -fapple-kext, because we don't ever want to devirtualize virtual member function calls in that case. 3. Give the correct linkage for vtables where the key function is not defined. 4. Update the linkage for RTTI structures when necessary. llvm-svn: 124565
* Add hardcoded -L/usr/lib after all -L options to the FreeBSD linkerRoman Divacky2011-01-301-0/+1
| | | | | | | | invocation. This mimics what gcc does and fixes libtool check for libraries. llvm-svn: 124558
* Remove dead code.Anders Carlsson2011-01-291-57/+3
| | | | llvm-svn: 124554
* When emitting RTTI for a non-class type, compute the visibility of the RTTI ↵Anders Carlsson2011-01-291-10/+15
| | | | | | data based on the explicit visibility of the type. llvm-svn: 124553
* Support for -plugin-arg- with -add-pluginNico Weber2011-01-292-1/+13
| | | | llvm-svn: 124551
* Move GetLLVMVisibility to CodeGenModule.Anders Carlsson2011-01-292-11/+10
| | | | llvm-svn: 124550
* Add RTTIBuilder::GetAddrOfTypeName which uses the newly added ↵Anders Carlsson2011-01-292-5/+42
| | | | | | | | CreateOrReplaceCXXRuntimeVariable. Set the visibility for typeinfo names. llvm-svn: 124548
* Change CodeGenModule::setTypeVisibility to take a TypeVisibilityKind enum ↵Anders Carlsson2011-01-295-6/+16
| | | | | | instead of an "IsForRTTI" flag. llvm-svn: 124546
* Replace an isa/cast with a dyn_cast.Anders Carlsson2011-01-291-2/+2
| | | | llvm-svn: 124542
* Get rid of an unneeded parameter from setGlobalVisibility.Anders Carlsson2011-01-293-10/+7
| | | | llvm-svn: 124541
* Give VTTs the right visibility.Anders Carlsson2011-01-291-0/+3
| | | | llvm-svn: 124540
* Make emitting a VTT a two-step process, much like emitting a VTable. You ↵Anders Carlsson2011-01-295-51/+46
| | | | | | first get the address of the VTT, and then pass it to EmitVTTDefinition. llvm-svn: 124539
* Use CGM.CreateOrReplaceCXXRuntimeVariable in CGVTables.cppAnders Carlsson2011-01-292-48/+5
| | | | llvm-svn: 124538
* Add a new function, to be used by CGRTTI, CGVTables and CGVTT (which each ↵Anders Carlsson2011-01-292-0/+47
| | | | | | has their own copy of this code). llvm-svn: 124537
* Replace a literal '8' with getCharWidth().Ken Dyck2011-01-291-2/+3
| | | | llvm-svn: 124536
* Remove IsDefinition from CodeGenModule::setTypeVisibility; it is always true.Anders Carlsson2011-01-294-6/+5
| | | | llvm-svn: 124529
* When trying to get the most derived class, don't assume that we can ignore ↵Anders Carlsson2011-01-291-1/+17
| | | | | | all casts. We can only ignore derived-to-base and no-op casts. Fixes selfhost. llvm-svn: 124528
* When calling a virtual member function on a base class and the most derived ↵Anders Carlsson2011-01-291-1/+24
| | | | | | class is marked 'final', we can devirtualize the call. llvm-svn: 124524
* When doing a derived-to-base class through a virtual class, we don't have to ↵Anders Carlsson2011-01-291-2/+11
| | | | | | get the vbase offset from the vtable if the derived class is marked final. llvm-svn: 124523
* More work to support -fapple-kext regarding Fariborz Jahanian2011-01-283-1/+11
| | | | | | | indirect vf calls and addition of extra entry at bottom of vtbls. llvm-svn: 124507
* Fix some corner cases in the __is_base_of logic.John McCall2011-01-282-23/+33
| | | | llvm-svn: 124505
* Add my new file to the CMake lists, sorry about that.John McCall2011-01-281-0/+1
| | | | llvm-svn: 124503
* Move all the cleanups framework code into a single file.John McCall2011-01-288-1661/+1710
| | | | | | Pure motion. llvm-svn: 124484
* Reorganize the value-dominance metaprogram and introduce a specializationJohn McCall2011-01-282-121/+119
| | | | | | for CodeGen's RValue type. llvm-svn: 124483
* Convert the exception-freeing cleanup over to the conditional cleanups code,John McCall2011-01-284-119/+88
| | | | | | | | | fixing a crash which probably nobody was ever going to see. In doing so, fix a horrendous number of problems with the conditional-cleanups code. Also, make conditional cleanups re-use the cleanup's activation variable, which avoids some unfortunate repetitiveness. llvm-svn: 124481
* PR9037: Allow override, final, and new as an extension on inline members.Nico Weber2011-01-282-6/+17
| | | | llvm-svn: 124477
* Give OpaqueValueExpr a source location, because its source locationDouglas Gregor2011-01-287-9/+17
| | | | | | | | might be queried in places where we absolutely require a valid location (e.g., for template instantiation). Fixes some major brokenness in the use of __is_convertible_to. llvm-svn: 124465
* Allow elision of invocations of move constructors from temporary objects.Douglas Gregor2011-01-271-1/+1
| | | | llvm-svn: 124455
* When producing IR for a lvalue-to-rvalue cast *as an lvalue*, onlyDouglas Gregor2011-01-271-2/+3
| | | | | | | | | non-class prvalues actually require the realization of a temporary. For everything else, we already have an lvalue (or class prvalue) in the subexpression. Note: we're missing some move elision in this case. I'll tackle that next. llvm-svn: 124453
* Fix an objective-c rewriter bug rewriting a __block Fariborz Jahanian2011-01-271-5/+7
| | | | | | | variable declaration of a struct declared type. // rdar://8918702 llvm-svn: 124451
* Teach the evaluation of the __is_convertible_to trait to translateDouglas Gregor2011-01-273-26/+68
| | | | | | | | | | | | | | | access control errors into SFINAE errors, so that the trait provides enough support to implement the C++0x std::is_convertible type trait. To get there, the SFINAETrap now knows how to set up a SFINAE context independent of any template instantiations or template argument deduction steps, and (separately) can set a Sema flag to translate access control errors into SFINAE errors. The latter can also be useful if we decide that access control errors during template argument deduction should cause substitution failure (rather than a hard error) as has been proposed for C++0x. llvm-svn: 124446
* Separate the access-control diagnostics from other diagnostics that do not ↵Douglas Gregor2011-01-272-5/+11
| | | | | | have SFINAE behavior. llvm-svn: 124441
* Document some serious badness in our evaluation of the type traits: we need ↵Douglas Gregor2011-01-271-0/+2
| | | | | | to be sure we have complete types in many cases llvm-svn: 124428
* Implement the Microsoft __is_convertible_to type trait, modeling theDouglas Gregor2011-01-275-4/+54
| | | | | | | | | | semantics after the C++0x is_convertible type trait. This implementation is not 100% complete, because it allows access errors to be hard errors (rather than just evaluating false). Original patch by Steven Watanabe! llvm-svn: 124425
* Fixed parameter names.Abramo Bagnara2011-01-272-9/+9
| | | | llvm-svn: 124408
* Revert r124217 because it didn't catch the actual error case it was trying toJeffrey Yasskin2011-01-273-25/+1
| | | | | | | | | | catch: lock_guard(my_mutex); declares a variable instead of creating a temporary. llvm-svn: 124398
* Teach -Wuninitialized about indirect goto. Fixes PR 9071.Ted Kremenek2011-01-271-2/+2
| | | | llvm-svn: 124394
* Wire up attributes 'ns_consumed' and 'cf_consumed' in the static analyzer's ↵Ted Kremenek2011-01-272-1/+36
| | | | | | ObjC retain/release checker. llvm-svn: 124386
* Allow #pragma unused to be used on global variables like gcc. Fixes ↵Argyrios Kyrtzidis2011-01-271-2/+2
| | | | | | rdar://8793832. llvm-svn: 124383
* Teach ASTUnit to save the specified target features, sinceDouglas Gregor2011-01-271-0/+6
| | | | | | | TargetInfo::CreateTargetInfo() mangles the target options in a way that is not idempotent. Fixes <rdar://problem/8807535>. llvm-svn: 124382
OpenPOWER on IntegriCloud