aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic
AgeCommit message (Collapse)Author
2013-01-13Fix LLP64 build.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172357 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-13Added builtins for multiprecision adds.Michael Gottesman
We lower all of these intrinsics into a 2x chained usage of uadd.with.overflow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172341 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12Prune an unused diagnostic, detected after improving the script in r172330Dmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172331 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12Remove unused diagnosticsDmitri Gribenko
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172326 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko
brought into 'clang' namespace by clang/Basic/LLVM.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12Add missing includes and forward declarations so that headers don't depend onDmitri Gribenko
other headers included before them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172320 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12Provide Decl::getOwningModule(), which determines the (sub)module inDouglas Gregor
which a particular declaration resides. Use this information to customize the "definition of 'blah' must be imported from another module" diagnostic with the module the user actually has to import. Additionally, recover by importing that module, so we don't complain about other names in that module. Still TODO: coming up with decent Fix-Its for these cases, and expand this recovery approach for other name lookup failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172290 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-12Fix -Wunused-comparison for comparisons in arguments to function-like macros.Matt Beaumont-Gay
Previously, -Wunused-comparison ignored comparisons in both macro bodies and macro arguments, but we would still emit a -Wunused-value warning for either. Now we correctly emit -Wunused-comparison for expressions in macro arguments. Also, add isMacroBodyExpansion to SourceManager, to go along with isMacroArgExpansion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172279 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11Improve diagnostic per Richard's suggestionFariborz Jahanian
(which may yet change if we move the diagnostic outside case value). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172242 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10In my last patch use InGroup<Switch> (per Dmitri's comment).Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172103 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10Provide a better warning when case value overflows.Fariborz Jahanian
// rdar://11577384 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172102 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10Diagnostics: name all implicit groups used more than once.Jordan Rose
This will be a new style requirement going forwards: a diagnostic can only use the implicit InGroup<DiagGroup<"foo">> syntax if "foo" is not used by any other diagnostics; as soon as it is, it needs an explicit group. This also brings some stray "conversion" diagnostics into the "Value Conversion Issue" category, instead of the more generic "Semantic Issue" category. I consider this an improvement! - warn_impcast_complex_scalar - warn_impcast_float_integer - warn_impcast_float_precision - warn_impcast_integer_precision - warn_impcast_vector_scalar git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172088 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10Enable intel_ocl_bicc for x86_64 target only. Remove fix from 171969 that ↵Guy Benyei
enabled this extension for multiple targets. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172052 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09Enable intel_ocl_bicc for x86_64 target. This was missed in r171056.Guy Benyei
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171969 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09put back diagnostics when flexible members are capturedFariborz Jahanian
in lambdas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171921 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-08Remove lambda from my last patch.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171915 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-08objectiveC blocks: It is impractical to capture Fariborz Jahanian
struct variables with flexiable array members in blocks (and lambdas). Issue error instead of crashing in IRGen. // rdar://12655829 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171912 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-08Remove on-by-default warning from -Wmost.David Blaikie
-Wint-to-pointer-cast, added to match GCC's warning by the same name, doesn't need to be in any other groups (as it isn't in any groups in GCC either). Found in post-commit review by Ted Kremenek. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171893 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07Add support for attribute((mode(unwind_word))).Rafael Espindola
Patch by Nick Lewycky. Fixes pr8703. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171781 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07Simplify. No behavior change.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171680 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04Add the module name to the 'incomplete umbrella header' warning.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171497 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04Fix up various builtin declaration of objc_msgSend familiesFariborz Jahanian
to match those foung in objc.h an avoid spurious warnings. // rdar://12489098 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171492 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04Remove -Wmodule-build; it was a dumb idea anyway. <rdar://problem/12957525>Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171478 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-03Fix capitalization of Objective-C in diagnostic.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171440 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-02s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few ↵Richard Smith
nearby 'C++0x' comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171372 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-02s/CPlusPlus0x/CPlusPlus11/gRichard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-28Improve diagnostic wording for when an implicitly-deleted special memberRichard Smith
function is selected by overload resolution. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171190 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-27Implement dcl.link paragraph 5.Rafael Espindola
The language linkage of redeclarations must match. GCC was already reporting an error for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171139 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-25Produce an actual error before attempting to attach notes to it when bailing outRichard Smith
due to FORCE_CLANG_DIAGNOSTICS_CRASH=1. Also add a test for that env var. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171074 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-25Add intel_ocl_bicc calling convention as a function attribute to clang. The ↵Guy Benyei
calling convention is already implemented in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171056 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-22Add back -Wduplicate-enum which I mistakenly removed.Ted Kremenek
This was removed with -Wunique-enum, which is still removed. The corresponding thread on cfe-comments for that warning is here: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-September/024224.html If we get specific user feedback for -Wduplicate-enum we can evaluate whether or not to keep it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170974 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-21Tweak Sema::CheckLiteralKind() to also include block literalsTed Kremenek
This simplifies some diagnostic logic in checkUnsafeAssignLiteral(), hopefully making it less error prone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170945 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-21Change checkUnsafeAssignLiteral() to use the new Sema::CheckLiteralKind().Ted Kremenek
Along the way, fix a bug in CheckLiteralKind(), previously in diagnoseObjCLiteralComparison, where we didn't ignore parentheses in boxed expressions for purpose of classification. In other words, both @42 and @(42) should be classified as numeric literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170931 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-21Extend checkUnsafeAssigns() to also handle assigning an object literal to a ↵Ted Kremenek
weak reference. Thanks to Jordan Rose and John McCall for their sage code review. Fixes <rdar://problem/12569201>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170864 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20Revert "Warn if a __weak variable is initialized with an Objective-C object ↵Ted Kremenek
literal." Per code feedback, I want to see if there is a more general way to do this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170777 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20Warn if a __weak variable is initialized with an Objective-C object literal.Ted Kremenek
Such variables may immediately become nil or may have unpredictable behavior. Fixes <rdar://problem/12569201>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170763 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20Move operator precedence calculation to new headerDaniel Jasper
Thereby, it can be reused by clang-format and others. Review: http://llvm-reviews.chandlerc.com/D229 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170757 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20Attribute 'cf_returns_autoreleased' doesn't really exist.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170723 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling
which is wrong here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170721 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20Fix code that attempted to produce a diagnostic with one DiagnosticEngine, thenRichard Smith
produce a note for that diagnostic either with a different DiagnosticEngine or after calling DiagnosticEngine::Reset(). That didn't make any sense, and did the wrong thing if the original diagnostic was suppressed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170636 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19[driver] Have -isysroot warn on nonexistent paths.Chad Rosier
rdar://12282267 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170611 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling
single attribute in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170500 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-19Attempt to clarify a vexing-parse diagnostic.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170492 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18CodeGen: Expand creal and cimag into complex field loadsMeador Inge
PR 14529 was opened because neither Clang or LLVM was expanding calls to creal* or cimag* into instructions that just load the respective complex field. After some discussion, it was not considered realistic to do this in LLVM because of the platform specific way complex types are expanded. Thus a way to solve this in Clang was pursued. GCC does a similar expansion. This patch adds the feature to Clang by making the creal* and cimag* functions library builtins and modifying the builtin code generator to look for the new builtin types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170455 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18Re-commit r170428 changes with Linux style file endings.Guy Benyei
Add OpenCL images as clang builtin types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170432 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei
these files to Windows style. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170431 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18Add OpenCL images as clang builtin types.Guy Benyei
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170428 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18When warning about a missing prototype because a function declaration is ↵Anders Carlsson
missing 'void', insert a fixit to add the void. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170399 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18Use the correct return type (size_t) for these builtins.Bill Wendling
<rdar://problem/12646344> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170393 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18Add an expected parameter for the size of the destination.Bill Wendling
<rdar://problem/12622659> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170392 91177308-0d34-0410-b5e6-96231b3b80d8