summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* PR8302: Check for shadowing a template parameter when declaring a templateRichard Smith2013-06-251-23/+19
| | | | | | template parameter. llvm-svn: 184884
* Don't try to get the layout of an invalid decl in getDeclAlign.Matt Beaumont-Gay2013-06-252-17/+21
| | | | | | | | | | | When the decl that we're getting alignment for is a FieldDecl, and the field's parent record is invalid, skip the actual field alignment calculation (and return 1-byte alignment in the general case). Also, assert in in getASTRecordLayout that the decl is valid. This was inspired by PR16292; see also r184581 and r184751. llvm-svn: 184883
* Implement DR21David Majnemer2013-06-251-7/+9
| | | | | | | | | | A default template-argument shall not be specified in a friend template declaration. Interestingly, we properly handled default template arguments on friend class members but not on just friend classes. llvm-svn: 184882
* Fix null pointer dereference if we redeclare an unprototyped function. Patch byRichard Smith2013-06-251-9/+11
| | | | | | WenHan Gu! llvm-svn: 184875
* Fix a comment.Nico Weber2013-06-251-1/+1
| | | | llvm-svn: 184873
* More of N3652: don't add an implicit 'const' to 'constexpr' member functions ↵Richard Smith2013-06-251-1/+2
| | | | | | when checking for overloads in C++1y. llvm-svn: 184865
* Objective-C: Warn when IBOutletCollection propertyFariborz Jahanian2013-06-251-0/+2
| | | | | | | is declared to have 'assign' attribute. // rdar://14212998 llvm-svn: 184863
* Remove misplaced commentEli Bendersky2013-06-251-1/+0
| | | | llvm-svn: 184862
* In tooling, reenable freeing of datastructures in codegen, just as we do forNick Lewycky2013-06-251-0/+1
| | | | | | the frontend. We don't want to respect the -disable-free flag here. llvm-svn: 184861
* Use simpler version of llvm::sys::fs::exists.Rafael Espindola2013-06-251-14/+9
| | | | llvm-svn: 184857
* Don't use PathV1.h in Tools.cpp.Rafael Espindola2013-06-251-11/+7
| | | | llvm-svn: 184856
* Use the simpler version of llvm::sys::fs::exists.Rafael Espindola2013-06-251-8/+5
| | | | llvm-svn: 184855
* Use the new llvm::sys::EnvPathSeparator.Rafael Espindola2013-06-251-1/+2
| | | | llvm-svn: 184851
* Fix a couple of PPC predefined macros that I spotted while driving byChandler Carruth2013-06-251-2/+2
| | | | | | | | this code. These aren't technically standard predefines for the platform but apparantly lots of folks use them as they show up within LLVM's own codebase. ;] This may even fix some self host issues w/ the JIT!!! llvm-svn: 184830
* Add r184803 back now that the bug in unique_file has been fixed.Rafael Espindola2013-06-251-21/+6
| | | | | | | | Original message: Use the new PathV2 instead of implementing the logic in clang. llvm-svn: 184825
* Revert "Use the new PathV2 instead of implementing the logic in clang."Rafael Espindola2013-06-251-6/+21
| | | | | | This reverts commit 184803 while I debug the failures on the bots. llvm-svn: 184818
* [analyzer] Handle zeroing CXXConstructExprs.Jordan Rose2013-06-251-1/+32
| | | | | | | | | | | | | | | Re-apply r184511, reverted in r184561, with the trivial default constructor fast path removed -- it turned out not to be necessary here. Certain expressions can cause a constructor invocation to zero-initialize its object even if the constructor itself does no initialization. The analyzer now handles that before evaluating the call to the constructor, using the same "default binding" mechanism that calloc() uses, rather than simply ignoring the zero-initialization flag. <rdar://problem/14212563> llvm-svn: 184815
* [analyzer] Don't initialize virtual base classes more than once.Jordan Rose2013-06-251-1/+19
| | | | | | | | | | | | | | | In order to make sure virtual base classes are always initialized once, the AST contains initializers for the base class in /all/ of its descendents, not just the immediate descendents. However, at runtime, the most-derived object is responsible for initializing all the virtual base classes; all the other initializers will be ignored. The analyzer now checks to see if it's being called from another base constructor, and if so does not perform virtual base initialization. <rdar://problem/14236851> llvm-svn: 184814
* Fix regression from r184810.Eli Friedman2013-06-251-1/+3
| | | | | | | Specifically, CallExpr::getCalleeDecl() can return null, so make sure to handle that correctly. llvm-svn: 184813
* Make -vectorize-... proper cc1 flags instead of abusing -backend-option. FixesNick Lewycky2013-06-253-10/+12
| | | | | | usage of clang as a library. llvm-svn: 184812
* Fix deserializing of class template partial specializations. Assign sequenceRichard Smith2013-06-252-7/+6
| | | | | | | | | | numbers as we deserialize class template partial specializations. We can't assume that the old sequence numbers will work. The sequence numbers are still deterministic, but are now a lot less predictable for class template partial specializations in modules/PCH. llvm-svn: 184811
* Fix noexcept for delete expressions.Eli Friedman2013-06-251-6/+5
| | | | | | | Using "delete" on a pointer to an incomplete type can't throw. While I'm here, clean up the signature of the canCalleeThrow() helper. llvm-svn: 184810
* Remove PathV1.h from Driver.cpp.Rafael Espindola2013-06-251-2/+1
| | | | llvm-svn: 184807
* Formatter/ObjC: Correctly format casts in objc message send expressions.Nico Weber2013-06-251-3/+2
| | | | llvm-svn: 184804
* Use the new PathV2 instead of implementing the logic in clang.Rafael Espindola2013-06-251-20/+6
| | | | llvm-svn: 184803
* Delete a couple dead checks.Eli Friedman2013-06-251-82/+76
| | | | | | | | Use castAs<> where appropriate. Don't check conditionals which are always true. Delete a bit of dead code. Reindent a bunch of code which is no longer guarded by an if statement. llvm-svn: 184801
* Delete dead code.Eli Friedman2013-06-251-17/+0
| | | | llvm-svn: 184795
* Check for matching template-parameter-lists when merging template declarations.Richard Smith2013-06-241-3/+52
| | | | llvm-svn: 184791
* Tweak -Wdeprecated-objc-pointer-introspection to have a subgroup for results ↵Ted Kremenek2013-06-241-1/+14
| | | | | | | | | | | | | of using -performSelectorXXX. -performSelector: and friends return a value that is boxed as an Objective-C pointer. Sometimes it is an Objective-C pointer, sometimes it isn't. Some clients may wish to silence this warning based on calling this method. Fixes <rdar://problem/14147304> llvm-svn: 184789
* [libclang/codecompletion] Make sure the top-level decl hash takes into ↵Argyrios Kyrtzidis2013-06-241-1/+9
| | | | | | | | | | | account ImportDecls. The top-level hash is used to determine if we need to update the global code-completion results. ImportDecls did not affect the hash so a newly introduced ImportDecl would not trigger an update of the global results. rdar://14202797 llvm-svn: 184782
* Change mangling of objects inside block literals.Eli Friedman2013-06-241-6/+9
| | | | | | | | | | | | This changes the mangling of local static variables/etc. inside blocks to do something simple and sane. This avoids depending on the way we mangle blocks, which isn't really appropriate here. John, please take a look at this to make sure the mangling I chose is sane. Fixes <rdar://problem/14074423>. llvm-svn: 184780
* [ms-cxxabi] Use sugared types in the mangler instead of canonical typesReid Kleckner2013-06-241-34/+39
| | | | | | | | | | | | | | | | | | | | | At this point, it's clear that the MSVC mangler uses the type-as-written instead of the canonical type, so this should bring us closer to MSVC. The main thrust of this change is to fix the way we mangle decayed array parameters of function pointer parameters. With a DecayedType sugar node, this code can now be much simpler. Fixes PR16096. This also fixes a separate issue that Richard spotted in review. Because separate declarations of the same entity can be spelled and mangled differently, MSVC always mangles the earliest declaration in an attempt to avoid link errors. Clang now does the same. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D844 llvm-svn: 184777
* [arcmt/driver] For the -ccc-arcmt-* flags, claim them when -fno-objc-arc is ↵Argyrios Kyrtzidis2013-06-241-0/+4
| | | | | | | | | | passed to avoid the "argument unused during compilation" warning. rdar://14240566 llvm-svn: 184776
* Use getAs<> where appropriate on QualTypes instead of using dyn_cast.Eli Friedman2013-06-241-14/+7
| | | | llvm-svn: 184775
* Convert some uses of llvm::sys::Path.Rafael Espindola2013-06-241-27/+27
| | | | llvm-svn: 184774
* Use the simpler version of llvm::sys::fs::exists.Rafael Espindola2013-06-241-8/+4
| | | | llvm-svn: 184770
* [analyzer] Add a debug checker that prints Exploded GraphAnna Zaks2013-06-242-0/+25
| | | | | | | | | | | Add a debug checker that is useful to understand how the ExplodedGraph is built; it can be triggered using the following command: clang -cc1 -analyze -analyzer-checker=debug.ViewExplodedGraph my_program.c A patch by Béatrice Creusillet! llvm-svn: 184768
* Convert last use of PathV1.h in Compilation.cppRafael Espindola2013-06-241-17/+20
| | | | | | | | The way we decide which file to remove is fairly odd. I took a quick look at maybe changing that, but it would be a more work than I want to put at this right now, so I left pair of FIXMEs. llvm-svn: 184766
* [AST] Introduce a new DecayedType sugar nodeReid Kleckner2013-06-2412-20/+121
| | | | | | | | | | | | | | The goal of this sugar node is to be able to look at an arbitrary FunctionType and tell if any of the parameters were decayed from an array or function type. Ultimately this is necessary to implement Microsoft's C++ name mangling scheme, which mangles decayed arrays differently from normal pointers. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1014 llvm-svn: 184763
* Add the global namespace (the "::" namespace specifier) to the list ofKaelyn Uhrain2013-06-241-1/+7
| | | | | | namespaces to try for potential typo corrections. llvm-svn: 184762
* Check the canonical parameter type with getAs<>() in a static checkerReid Kleckner2013-06-241-5/+5
| | | | | | This will prevent breakage when I introduce the DecayedType sugar node. llvm-svn: 184755
* Convert a use of PathV1.hRafael Espindola2013-06-241-2/+2
| | | | llvm-svn: 184753
* Convert a use of PathV1.h.Rafael Espindola2013-06-241-22/+16
| | | | llvm-svn: 184743
* [Sema] Call CheckParmForFunctionDef on ObjC method parametersReid Kleckner2013-06-242-5/+6
| | | | | | | CheckParmForFunctionDef performs standard checks for type completeness and other things like a destructor check for the MSVC++ ABI. llvm-svn: 184740
* The profile library must come before the C library so that it can useChandler Carruth2013-06-241-2/+3
| | | | | | atexit. llvm-svn: 184708
* Avoid adding entries to the DeclContext lookup table multiple times when lazilyRichard Smith2013-06-241-1/+9
| | | | | | | | | | | | | | | | | constructing a lookup table. Previously, buildLookup would add lookup table entries for each item lexically within the DC, and adding the first entry with a given name would trigger the external source to add all its entries with that name. Then buildLookup would carry on and re-add those entries all over again. Instead, follow a simple rule: a declaration from an external source is only ever made visible by the external source. One exception to this: since we don't usually build a lookup table for the TU in C, and we never serialize one, we don't expect the external source to provide lookups in the TU in C, so we build those ones ourselves. llvm-svn: 184696
* DebugInfo: ensure negative enumerators are emitted as suchDavid Blaikie2013-06-241-1/+1
| | | | | | | | | | There's still a problem here - since we're not appropriately using the signedness/range of the enum to chooset the encoding and emission of enumerators, but GCC has some bugs around this too so I assume that's not /such/ a high priority though I may get to it soon out of completeness. llvm-svn: 184695
* Slightly improve cross-module merging for function templates.Richard Smith2013-06-241-7/+12
| | | | llvm-svn: 184689
* Comment parsing: allow "\param ..." to describe variadic argumentsDmitri Gribenko2013-06-242-1/+21
| | | | | | | | Original patch by Fariborz Jahanian; extended by me. Fixes rdar://14124644 llvm-svn: 184688
* When setting the external visible declarations for a decl context, checkRichard Smith2013-06-241-7/+32
| | | | | | | whether they replace any existing lookups in the context, rather than accumulating a bunch of lookup results referring to the same entity. llvm-svn: 184679
OpenPOWER on IntegriCloud