summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Support EFI target triple, from Carl Norum!Douglas Gregor2011-02-011-1/+4
| | | | llvm-svn: 124660
* Make that test case actually test something, and add another test.John McCall2011-02-011-2/+12
| | | | llvm-svn: 124654
* The code trying to assign a typedef to an anonymous tag declaration wasJohn McCall2011-02-013-15/+57
| | | | | | | | 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-012-2/+3
| | | | llvm-svn: 124651
* Correct units in doxygen comment for NonVirtualSize.Ken Dyck2011-02-011-1/+1
| | | | llvm-svn: 124647
* Convert RecordLayout::NonVirtualSize from bit units to CharUnits.Ken Dyck2011-02-016-17/+23
| | | | llvm-svn: 124646
* When initializing struct members, the important thing is that the ↵Argyrios Kyrtzidis2011-02-012-2/+14
| | | | | | | | | | "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-012-3/+2
| | | | | | | | | | 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-016-35/+54
| | | | | | CheckPointerTypesForAssignment. llvm-svn: 124632
* Improve the diagnostic for -Wcustom-atomic-properties. Suggestion by Fariborz!Argyrios Kyrtzidis2011-01-313-5/+15
| | | | llvm-svn: 124620
* Make Check*PointerTypesForAssignment private and tell them that they'reJohn McCall2011-01-312-85/+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-313-4/+10
| | | | | | 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-312-5/+13
| | | | | | 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-314-4/+47
| | | | | | | | | | | 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
* Document that set-xcode-analyzer should typically be run using sudo.Ted Kremenek2011-01-311-3/+11
| | | | llvm-svn: 124602
* Implement reasonable conversion ranking for Objective-C pointerDouglas Gregor2011-01-313-29/+164
| | | | | | | | | | | | | | | | | | | | | | | | 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-312-2/+14
| | | | | | Kramer for the hint! llvm-svn: 124585
* Implement the suggested resolution to core issue 547, extended to alsoDouglas Gregor2011-01-317-40/+154
| | | | | | | | | 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-314-2/+41
| | | | | | rdar://8756445. llvm-svn: 124582
* Don't warn that variables in C++ static member functions shadow fields. ↵Argyrios Kyrtzidis2011-01-312-0/+19
| | | | | | Fixes rdar://8900456. llvm-svn: 124581
* Fix the diagnostic when we are shadowing an external variable and there ↵Argyrios Kyrtzidis2011-01-312-14/+30
| | | | | | 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-313-10/+24
| | | | llvm-svn: 124579
* 'extern' variables in functions don't shadow externs in global scope. Fixes ↵Argyrios Kyrtzidis2011-01-312-0/+19
| | | | | | rdar://8883302. llvm-svn: 124578
* If there were errors, disable 'unused' warnings since they will mostly be noise.Argyrios Kyrtzidis2011-01-312-19/+31
| | | | | | Fixes rdar://8736362. llvm-svn: 124577
* Error for use of field from anonymous struct or union should say "invalid ↵Argyrios Kyrtzidis2011-01-312-1/+13
| | | | | | | | 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-314-14/+65
| | | | | | Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236. llvm-svn: 124575
* Fix test that didn't actually test what it wanted to test.Argyrios Kyrtzidis2011-01-311-4/+4
| | | | llvm-svn: 124574
* Allow Microsoft attributes in a constructor's parameter list.Francois Pichet2011-01-312-0/+12
| | | | | | 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-305-1/+130
| | | | | | | | | | | | | | | | | | | | | | | 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-302-1/+2
| | | | | | | | invocation. This mimics what gcc does and fixes libtool check for libraries. llvm-svn: 124558
* Fix test.Anders Carlsson2011-01-291-2/+2
| | | | llvm-svn: 124555
* 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-293-12/+17
| | | | | | data based on the explicit visibility of the type. llvm-svn: 124553
* Support for -plugin-arg- with -add-pluginNico Weber2011-01-293-2/+17
| | | | llvm-svn: 124551
* Move GetLLVMVisibility to CodeGenModule.Anders Carlsson2011-01-292-11/+10
| | | | llvm-svn: 124550
* Update tests.Anders Carlsson2011-01-292-2/+2
| | | | | | I'm still not sure if having the typenames be visible with -hidden-weak-vtables, but I think it makes sense. llvm-svn: 124549
* 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
* Add a test for RTTI visibility.Anders Carlsson2011-01-291-0/+35
| | | | llvm-svn: 124543
* 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-292-1/+6
| | | | llvm-svn: 124540
* Make emitting a VTT a two-step process, much like emitting a VTable. You ↵Anders Carlsson2011-01-296-54/+49
| | | | | | 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
OpenPOWER on IntegriCloud