summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Handle a "#pragma options align" inside a class.Argyrios Kyrtzidis2012-10-122-0/+10
| | | | llvm-svn: 165810
* Add dump support for comments coming fromFariborz Jahanian2012-10-121-5/+10
| | | | | | | overridden symbols. OK'ed off-line by Doug. // rdar://12378793 llvm-svn: 165807
* c-index-test.c: /* Use C style comment. */NAKAMURA Takumi2012-10-121-1/+1
| | | | llvm-svn: 165797
* clang/test/Index/index-module.m: Tweak expressions to fit Win32 paths.NAKAMURA Takumi2012-10-121-30/+28
| | | | llvm-svn: 165794
* Remove unused variable.Benjamin Kramer2012-10-121-2/+0
| | | | llvm-svn: 165793
* [PCH] We only need to record C++ overridden methods once for the canonical decl.Argyrios Kyrtzidis2012-10-121-5/+10
| | | | llvm-svn: 165788
* Conditionally use an integral cast for BodyFarm support for ↵Ted Kremenek2012-10-121-6/+19
| | | | | | OSAtomicCompareAndSwap if the return type is not a boolean. llvm-svn: 165774
* Track which particular submodule #undef's a macro, so that the actualDouglas Gregor2012-10-1210-36/+117
| | | | | | #undef only occurs if that submodule is imported. llvm-svn: 165773
* Remove dead code introduced in r165751.Chad Rosier2012-10-121-6/+2
| | | | llvm-svn: 165772
* search for overridden methods with comment when overriding methodFariborz Jahanian2012-10-117-45/+35
| | | | | | | has none of its own. Factor in Doug's comments. // rdar://12378793 llvm-svn: 165771
* Remove pointless classof()'s.Sean Silva2012-10-1140-425/+0
| | | | | | | Updates to llvm/Support/Casting.h have rendered these classof()'s irrelevant. llvm-svn: 165770
* Add missing classof().Sean Silva2012-10-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Somewhat troublingly, without this implemented, the check inside isa_impl<> would silently use the parent's `classof()` when determining whether it was okay to downcast from the parent to the child! Bug analysis: A build failure after removing the parent's `classof()` initially alerted me to the bug, after which a little bit of thinking and reading of the code identified the root cause. The compiler could be made to prevent this bug from happening if there were a way to ensure that in the code template <typename To, typename From, typename Enabler = void> struct isa_impl { static inline bool doit(const From &Val) { return To::classof(&Val); } }; that `To::classof` is actually inside the class `To`, and not in a base class. I am not aware of a way to check this in C++. If there is a means to perform that check, please bring it up on the list and this will be fixed. There is a high likelihood that there are other instances of this same bug in the codebase. llvm-svn: 165769
* Provide a fixit when taking the address of an unqualified member function.David Blaikie2012-10-113-2/+23
| | | | | | | | | | | | | This only applies if the type has a name. (we could potentially do something crazy with decltype in C++11 to qualify members of unnamed types but that seems excessive) It might be nice to also suggest a fixit for "&this->i", "&foo->i", and "&foo.i" but those expressions produce 'bound' member functions that have a different AST representation & make error recovery a little trickier. Left as future work. llvm-svn: 165763
* clang/test/Index/index-module.m: Move XFAIL. It was line-number-sensitive.NAKAMURA Takumi2012-10-111-1/+2
| | | | llvm-svn: 165762
* clang/test/Index/index-module.m: Mark it as XFAIL:win32 for now.NAKAMURA Takumi2012-10-111-0/+1
| | | | llvm-svn: 165761
* clang/test/Index/index-pch-with-module.m: Tweak expressions for win32 pathsep.NAKAMURA Takumi2012-10-111-3/+3
| | | | llvm-svn: 165760
* [ms-inline asm] Remove a bunch of parsing code from the front-end, which will beChad Rosier2012-10-112-97/+4
| | | | | | reimplemented in the AsmParser where it belongs. llvm-svn: 165752
* [ms-inline asm] Lookup the IdentifierInfo using the Idents table and remove theChad Rosier2012-10-112-26/+1
| | | | | | | | | now unused static helper function. The test case needs to be remove temporarily until I can better filter memory operands that aren't actual variable reference. llvm-svn: 165751
* Diagnose the expansion of ambiguous macro definitions. This can happenDouglas Gregor2012-10-1110-16/+99
| | | | | | | only with modules, when two disjoint modules #define the same identifier to different token sequences. llvm-svn: 165746
* Remove OSAtomicChecker.Ted Kremenek2012-10-115-227/+5
| | | | llvm-svn: 165744
* Switch over to BodyFarm implementation of OSAtomicCompareAndSwap andTed Kremenek2012-10-112-13/+130
| | | | | | objc_atomicCompareAndSwap. llvm-svn: 165743
* Teach GetBaseType() about BlockPointerTypes.Ted Kremenek2012-10-111-0/+2
| | | | llvm-svn: 165742
* Add TargetTransformInfo to the clang driver.Nadav Rotem2012-10-111-1/+5
| | | | llvm-svn: 165741
* [libclang] Make sure the index_data.main_filename field is initializedArgyrios Kyrtzidis2012-10-112-0/+54
| | | | | | | in c-index-test. index_enteredMainFile is not invoked when indexing a module file. llvm-svn: 165735
* [libclang] Remove this test while I investigate why it is crashing on ↵Argyrios Kyrtzidis2012-10-111-52/+0
| | | | | | release+asserts. llvm-svn: 165734
* Add null check for malformed code.Ted Kremenek2012-10-111-2/+5
| | | | llvm-svn: 165733
* [libclang] Add tests for indexing modules and PCHs using modules.Argyrios Kyrtzidis2012-10-113-1/+84
| | | | llvm-svn: 165732
* Fix build failure from r165722Derek Schuff2012-10-111-1/+1
| | | | llvm-svn: 165731
* Introduce a simple "hint" scheme to eliminate the quadratic behaviorDouglas Gregor2012-10-114-11/+14
| | | | | | associated with deserializing macro history for an identifier. llvm-svn: 165729
* Make the deserialization of PendingMacroIDs deterministic.Douglas Gregor2012-10-112-17/+11
| | | | llvm-svn: 165727
* Add in the first iteration of support for llvm/clang/lldb to allow variable ↵Micah Villmow2012-10-111-1/+1
| | | | | | per address space pointer sizes to be optimized correctly. llvm-svn: 165726
* -Warc-repeated-use-of-weak: fix a use-of-uninitialized and add a test case.Jordan Rose2012-10-112-1/+13
| | | | | | Fix-up for r165718, should get the buildbots back online. llvm-svn: 165723
* Properly factor Native Client defines to support NaCl as an OSDerek Schuff2012-10-117-11/+238
| | | | | | with x86/ARM architecture llvm-svn: 165722
* Handle gnu_inline in c++ in a gcc compatible way. Original patch by TobiasRafael Espindola2012-10-112-1/+10
| | | | | | Grosser. llvm-svn: 165720
* -Warc-repeated-use-of-weak: Don't warn on a single read followed by writes.Jordan Rose2012-10-112-10/+101
| | | | | | | | | | This is a "safe" pattern, or at least one that cannot be helped by using a strong local variable. However, if the single read is within a loop, it should /always/ be treated as potentially dangerous. <rdar://problem/12437490> llvm-svn: 165719
* -Warc-repeated-use-of-weak: Check messages to property accessors as well.Jordan Rose2012-10-114-3/+76
| | | | | | | | | | | | | | | | | | | Previously, [foo weakProp] was not being treated the same as foo.weakProp. Now, for every explicit message send, we check if it's a property access, and if so, if the property is weak. Then for every assignment of a message, we have to do the same thing again. This is a potentially expensive increase because determining whether a method is a property accessor requires searching through the methods it overrides. However, without it -Warc-repeated-use-of-weak will miss cases from people who prefer not to use dot syntax. If this turns out to be too expensive, we can try caching the result somewhere, or even lose precision by not checking superclass methods. The warning is off-by-default, though. <rdar://problem/12407765> llvm-svn: 165718
* [libclang] Improve AST serialization done by ASTUnit::Save().Argyrios Kyrtzidis2012-10-116-34/+85
| | | | | | | | | The ASTUnit needs to initialize an ASTWriter at the beginning of parsing to fully handle serialization of a translation unit that imports modules. Do this by introducing an option to enable it, which corresponds to CXTranslationUnit_ForSerialization on the C API side. llvm-svn: 165717
* ObjCMethodDecl::findPropertyDecl: bail out early if not an instance method.Jordan Rose2012-10-111-1/+1
| | | | | | | | | Currently, Objective-C does not support class properties, even though it allows calling class methods with dot syntax. No intended functionality change; purely optimization. llvm-svn: 165716
* Make X86_64ABIInfo clean for ABIs with 32 bit pointers, such as X32Derek Schuff2012-10-112-14/+23
| | | | | | and Native Client llvm-svn: 165715
* clang/test/CodeGenCXX/microsoft-uuidof.cpp: Fix for -Asserts.NAKAMURA Takumi2012-10-111-6/+6
| | | | llvm-svn: 165712
* Add codegen support for __uuidof().Nico Weber2012-10-1110-24/+213
| | | | llvm-svn: 165710
* Add prologue text for list of potential checkers.Ted Kremenek2012-10-111-0/+2
| | | | llvm-svn: 165705
* clang/lib/Headers/CMakeLists.txt: Add f16cintrin.h.NAKAMURA Takumi2012-10-111-0/+1
| | | | llvm-svn: 165688
* X86: add F16C support in ClangManman Ren2012-10-116-1/+113
| | | | | | | | | Support the following intrinsics: _mm_cvtph_ps, _mm256_cvtph_ps, _mm_cvtps_ph, _mm256_cvtps_ph rdar://12407875 llvm-svn: 165685
* Remove the ASTDeserializationListener's MacroVisible() callback, whichDouglas Gregor2012-10-114-25/+0
| | | | | | | is no longer necessary, as well as the little bit of infrastructure in the AST writer that used it. llvm-svn: 165684
* Remove an unused bit from the serialized IdentifierInfoDouglas Gregor2012-10-113-5/+1
| | | | llvm-svn: 165683
* Deserialize macro history when we deserialize an identifier that hasDouglas Gregor2012-10-1112-116/+353
| | | | | | | | | | | | | | | | | | | | | | | | macro history. When deserializing macro history, we arrange history such that the macros that have definitions (that haven't been #undef'd) and are visible come at the beginning of the list, which is what the preprocessor and other clients of Preprocessor::getMacroInfo() expect. If additional macro definitions become visible later, they'll be moved toward the front of the list. Note that it's possible to have ambiguities, but we don't diagnose them yet. There is a partially-implemented design decision here that, if a particular identifier has been defined or #undef'd within the translation unit, that definition (or #undef) hides any macro definitions that come from imported modules. There's still a little work to do to ensure that the right #undef'ing happens. Additionally, we'll need to scope the update records for #undefs, so they only kick in when the submodule containing that update record becomes visible. llvm-svn: 165682
* Teach set-xcode-analyzer that the new default value for ExecPath is ↵Ted Kremenek2012-10-111-2/+13
| | | | | | CLANG_ANALYZER_EXEC. llvm-svn: 165681
* Minor cleanup for r165678; no functional change.Eli Friedman2012-10-111-1/+1
| | | | llvm-svn: 165679
* Make sure we perform the variadic method check correctly for calls to a ↵Eli Friedman2012-10-113-2/+40
| | | | | | member operator(). PR14057. llvm-svn: 165678
OpenPOWER on IntegriCloud