summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* The code trying to assign a typedef to an anonymous tag declaration wasJohn McCall2011-02-012-15/+46
| | | | | | | | extremely rambunctious, both on parsing and on template instantiation. Calm it down, fixing an internal consistency assert on anonymous enum instantiation manglings. llvm-svn: 124653
* Revert 124633. The linker has been told how to merge available_externally.Rafael Espindola2011-02-011-1/+2
| | | | llvm-svn: 124651
* Convert RecordLayout::NonVirtualSize from bit units to CharUnits.Ken Dyck2011-02-015-13/+19
| | | | llvm-svn: 124646
* When initializing struct members, the important thing is that the ↵Argyrios Kyrtzidis2011-02-011-1/+2
| | | | | | | | | | "initializing" expression is compatible, not having the same type. Fix rdar://8183908 in which compatible vector types weren't initialized properly leading to a crash. llvm-svn: 124637
* Set visibility for available_externally globals. This is important for two ↵Rafael Espindola2011-02-011-2/+1
| | | | | | | | | | reasons: * llvm-link would complains about mismatched visibility * If we produce a relocation with an available_externally, it is good to know that it is hidden. llvm-svn: 124633
* Perform the bad-address-space conversions check as part of John McCall2011-02-012-27/+38
| | | | | | CheckPointerTypesForAssignment. llvm-svn: 124632
* Improve the diagnostic for -Wcustom-atomic-properties. Suggestion by Fariborz!Argyrios Kyrtzidis2011-01-311-2/+2
| | | | llvm-svn: 124620
* Make Check*PointerTypesForAssignment private and tell them that they'reJohn McCall2011-01-311-73/+63
| | | | | | working on canonical types already. llvm-svn: 124618
* Harden Lexer::GetBeginningOfToken() against bogus source locations andDouglas Gregor2011-01-312-2/+17
| | | | | | the disappearance/alteration of files. llvm-svn: 124616
* Slightly reorganize CheckAssignmentConstraints and remove some redundantJohn McCall2011-01-311-65/+87
| | | | | | logic. llvm-svn: 124615
* Teach Diagnostic::setClient() to free the existing, ownedDouglas Gregor2011-01-311-0/+7
| | | | | | client. Fixes a libclang leak. llvm-svn: 124614
* libclang: Don't allow RemoveFileOnSignal to be called via libclang, badness canDaniel Dunbar2011-01-311-1/+4
| | | | | | ensue. llvm-svn: 124613
* Frontend: Add an explicit RemoveFileOnSignal flag argument, to control theDaniel Dunbar2011-01-311-3/+6
| | | | | | automatic behavior (which is undesirable in a multithreaded context). llvm-svn: 124612
* Add -Wcustom-atomic-properties which warns if an atomic-by-default property ↵Argyrios Kyrtzidis2011-01-311-4/+30
| | | | | | | | | | | has custom getter or setter. The rationale is that it is highly likely that the user's getter/setter isn't atomically implemented. Off by default. Addresses rdar://8782645. -Wcustom-atomic-properties and -Wimplicit-atomic-properties are under the -Watomic-properties group. llvm-svn: 124609
* Implement reasonable conversion ranking for Objective-C pointerDouglas Gregor2011-01-311-22/+70
| | | | | | | | | | | | | | | | | | | | | | | | conversions (<rdar://problem/8592139>) for overload resolution. The conversion ranking mirrors C++'s conversion ranking fairly closely, except that we use a same pseudo-subtyping relationship employed by Objective-C pointer assignment rather than simple checking derived-to-base conversions. This change covers: - Conversions to pointers to a specific object type are better than conversions to 'id', 'Class', qualified 'id', or qualified 'Class' (note: GCC doesn't perform this ranking, but it matches C++'s rules for ranking conversions to void*). - Conversions to qualified 'id' or qualified 'Class' are better than conversions to 'id' or 'Class', respectively. - When two conversion sequences convert to the same type, rank the conversions based on the relationship between the types we're converting from. - When two conversion sequences convert from the same non-id, non-Class type, rank the conversions based on the relationship of the types we're converting to. (note: GCC allows this ranking even when converting from 'id', which is extremeley dangerous). llvm-svn: 124591
* Only warn for -Wnon-virtual-dtor for public destructors. Thanks to Benjamin ↵Argyrios Kyrtzidis2011-01-311-2/+2
| | | | | | Kramer for the hint! llvm-svn: 124585
* 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
OpenPOWER on IntegriCloud