summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Objective-C. Revert patch r193003 for furtherFariborz Jahanian2014-02-071-21/+0
| | | | | | internal discussions. // rdar://16006401 llvm-svn: 200986
* [analyzer] Just silence all warnings coming out of std::basic_string.Jordan Rose2014-02-071-11/+4
| | | | | | | | | This means always walking the whole call stack for the end path node, but we'll assume that's always fairly tractable. <rdar://problem/15952973> llvm-svn: 200980
* Stat system dependencies when using -verify-pchBen Langmuir2014-02-074-15/+28
| | | | | | | | We don't stat the system headers to check for stalenes during regular PCH loading for performance reasons. When explicitly saying -verify-pch, we want to check all the dependencies - user or system. llvm-svn: 200979
* ASTUnit: ArrayRef'ize RemappedFilesDmitri Gribenko2014-02-071-11/+8
| | | | llvm-svn: 200975
* clang-format: Fix column limit violation for merged lines in macros.Daniel Jasper2014-02-071-0/+15
| | | | | | | | | | | | | | | | Before (81 columns): #define A \ void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() { return aaaaaaaa; } \ int i; After: #define A \ void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa() { \ return aaaaaaaa; \ } \ int i; llvm-svn: 200974
* Fix AAPCS compliance for HFAs containing doubles and long doublesOliver Stannard2014-02-071-4/+23
| | | | | | | | | An HFA is defined as a struct containing floating point values of the same machine type. In the 32-bit ABI, double and long double have the same machine type, so a struct with a mixture of these types must be an HFA (assuming it meets the other criteria). llvm-svn: 200971
* clang-format: Fix range-based for-loop formatting.Daniel Jasper2014-02-071-0/+2
| | | | | | | | | | | | | | | Before: for (aaaaaaaaa aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaa.aaaaaaaaaaaa() .aaaaaaaaa() .a()) { } After: for (aaaaaaaaa aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaa.aaaaaaaaaaaa().aaaaaaaaa().a()) { } llvm-svn: 200968
* Revert r194097: "With this patch -Wwrite-strings is still implemented with ↵Argyrios Kyrtzidis2014-02-071-4/+7
| | | | | | | | | | | | | the terrible hack of passing -fconst-strings to -cc1" Passing or not a language option based on diagnostic settings is a bad idea, it breaks using a PCH that was compiled with different diagnostic settings. Also add a test case to make sure we don't regress. llvm-svn: 200964
* MS ABI: Don't be so hasty to judge an inheritance modelDavid Majnemer2014-02-072-10/+17
| | | | | | | | If we are in the middle of defining the class, don't attempt to validate previously annotated declarations. We may not have seen base specifiers or virtual method declarations yet. llvm-svn: 200959
* Temporary fix for PR18473: Don't try to evaluate the initializer for aRichard Smith2014-02-061-7/+6
| | | | | | | | | | | | type-dependent variable, even if the initializer isn't value-dependent. This happens for ParenListExprs composed of non-value-dependent subexpressions, for instance. We should really give ParenListExprs (and InitListExprs) the type of the initialized entity if they're used to represent a dependent initialization (and if so, set them to be type-, value- and instantiation-dependent). llvm-svn: 200954
* Fixes PR18762, stop the StmtPrinter for ObjCPropertyRefExpr from crashing onRichard Trieu2014-02-061-1/+3
| | | | | | certain receiver types. llvm-svn: 200953
* Add isListInitialization matcher.Peter Collingbourne2014-02-061-0/+1
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2708 llvm-svn: 200949
* PR18128: a lambda capture-default is not permitted for a non-local lambdaRichard Smith2014-02-061-1/+18
| | | | | | expression. llvm-svn: 200948
* Use correct ld emulation for EABI hardware float triple on NetBSD.Joerg Sonnenberger2014-02-061-2/+4
| | | | llvm-svn: 200946
* Move -verify-pch to use VerifyJobActionBen Langmuir2014-02-065-15/+38
| | | | | | | | | Use the verify hook rather than the compile hook to represent the -verify-pch action, and move the exising --verify-debug-info action into its own subclass of VerifyJobAction. Incidentally change the name printed by -ccc-print-phases for --verify-debug-info. llvm-svn: 200938
* Wired-up the new LLVM diagnostic system into clang diagnostic system.Quentin Colombet2014-02-061-1/+113
| | | | | | | | | The approach is similar to the existing inline-asm reporting, just more general. <rdar://problem/15886278> llvm-svn: 200931
* MS ABI: Handle indirect field decls in template argsDavid Majnemer2014-02-061-6/+7
| | | | | | | Properly support fields that come from anonymous unions and structs when used as template arguments for pointer to data member params. llvm-svn: 200921
* MS ABI: Tweak pointer-to-member mangling/inheritance model selectionDavid Majnemer2014-02-063-31/+31
| | | | | | | | | | | | Properly determine the inheritance model when dealing with nullptr: - If a nullptr template argument is being checked against pointer-to-member parameter, nail down an inheritance model. N.B. We will chose an inheritance model even if we won't ultimately choose the template to instantiate! Cooky, right? - Null pointer-to-datamembers have a virtual base table offset of -1, not zero. Previously, we chose an offset of 0. llvm-svn: 200920
* Allow transformation of VariableArray to ConstantArray.Serge Pavlov2014-02-061-1/+3
| | | | | | | | | | | | | | | | | In the following code: struct A { static const int sz; }; template<class T> void f() { T arr[A::sz]; } the array 'arr' is represented as a variable size array in the template. If 'A::sz' gets value below in the translation unit, the array in instantiation can turn into constant size array. This change fixes PR18633. Differential Revision: http://llvm-reviews.chandlerc.com/D2688 llvm-svn: 200899
* DR101, PR12770: If a function is declared in the same context as aRichard Smith2014-02-062-13/+29
| | | | | | | | using-declaration, and they declare the same function (either because the using-declaration is in the same namespace as the declaration it imports, or because they're both extern "C"), they do not conflict. llvm-svn: 200897
* Simplify code by combining ifs.Manman Ren2014-02-061-9/+7
| | | | llvm-svn: 200893
* Fix Werror introduced at r200874.Manman Ren2014-02-061-1/+1
| | | | llvm-svn: 200891
* Fix -Wunused-variable 'FD' by using it instead of ND when they're equal but FDNick Lewycky2014-02-051-2/+2
| | | | | | has a more precise type. llvm-svn: 200889
* Add a CC1 option -verify-pchBen Langmuir2014-02-059-14/+63
| | | | | | | | | This option will: - load the given pch file - verify it is not out of date by stat'ing dependencies, and - return 0 on success and non-zero on error llvm-svn: 200884
* Clean up some particularly ugly casting.Benjamin Kramer2014-02-051-12/+3
| | | | | | No functionality change. llvm-svn: 200877
* PGO: instrumentation based profiling sets function attributes.Manman Ren2014-02-053-1/+60
| | | | | | | | | | | | | | | We collect a maximal function count among all functions in the pgo data file. For functions that are hot, we set its InlineHint attribute. For functions that are cold, we set its Cold attribute. We currently treat functions with >= 30% of the maximal function count as hot and functions with <= 1% of the maximal function count are treated as cold. These two numbers are from preliminary tuning on SPEC. This commit should not affect non-PGO builds and should boost performance on instrumentation based PGO. llvm-svn: 200874
* MS ABI: Fix mangling of static methods and function referencesReid Kleckner2014-02-051-4/+9
| | | | | | | | Function references always use $1? like function pointers and never $E? like var decl references. Static methods are mangled like function pointers. llvm-svn: 200869
* Don't consider records with a NULL identifier as a name for typo correction.Kaelyn Uhrain2014-02-051-1/+1
| | | | | | | | | Because in C++, "anonymous" doesn't mean "nameless" for records. In other words, RecordDecl::isAnonymousStructOrUnion only returns true if the record lacks a name *and* is not used as the type in an object's declaration. llvm-svn: 200868
* Remove unused variable to fix -Werror buildReid Kleckner2014-02-051-3/+0
| | | | llvm-svn: 200861
* MS ABI: Mangle member pointer template argumentsReid Kleckner2014-02-056-137/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Member pointers are mangled as they would be represented at runtime. They can be a single integer literal, single decl, or a tuple with some more numbers tossed in. With Clang today, most of those numbers will be zero because we reject pointers to members of virtual bases. This change required moving VTableContextBase ownership from CodeGenVTables to ASTContext, because mangling now depends on vtable layout. I also hoisted the inheritance model helpers up to be inline static methods of MSInheritanceAttr. This makes the AST code that deals with member pointers much more readable. MSVC doesn't appear to have stable manglings of null member pointers: - Null data memptrs in function templates have a mangling collision with the first field of a non-polymorphic single inheritance class. - The mangling of null data memptrs changes if you add casts. - Large null function memptrs in class templates crash MSVC. Clang uses the class template mangling for null data memptrs and the function template mangling for null function memptrs to deal with this. Reviewers: majnemer Differential Revision: http://llvm-reviews.chandlerc.com/D2695 llvm-svn: 200857
* Fix the range for Malayam UCNs in C99.Joey Gouly2014-02-051-1/+1
| | | | llvm-svn: 200845
* clang-format: Don't indent relative to unary operators.Daniel Jasper2014-02-051-1/+0
| | | | | | | | | | | | | | It seems like most people see unary operators more like part of the subsequent identifier and find relative indentation odd. Before: aaaaaaaaaa(!aaaaaaaaaa( // break aaaaa)); After: aaaaaaaaaa(!aaaaaaaaaa( // break aaaaa)); llvm-svn: 200840
* Fix typo in CastExpr::getCastKindName.Jordan Rose2014-02-051-1/+1
| | | | | | Patch by Mathieu Baudet! llvm-svn: 200817
* Don't mark decls with mismatching exception specs invalid in MS mode (PR18683)Hans Wennborg2014-02-051-7/+15
| | | | | | | | | We accept these with a warning in MS mode, but we would previously mark them invalid, causing us not to emit code for them. Differential Revision: http://llvm-reviews.chandlerc.com/D2681 llvm-svn: 200815
* Tighten lax vector-conversion rules and enforce them consistently.John McCall2014-02-042-103/+119
| | | | | | | | | | | | | | | | | | | | When a lax conversion featured a vector and a non-vector, we were only requiring the non-vector to be a scalar type, but really it needs to be a real type (i.e. integral or real floating); it is not reasonable to allow a pointer, member pointer, or complex type here. r198474 required lax conversions to match in "data size", i.e. element size * element count, forbidding matches that happen only because a vector is rounded up to the nearest power of two in size. Unfortunately, the erroneous logic was repeated in several different places; unify them to use the new condition, so that it triggers for arbitrary conversions and not just those performed as part of binary operator checking. rdar://15931426 llvm-svn: 200810
* Debug info: fix a crasher when when emitting debug info forAdrian Prantl2014-02-041-3/+4
| | | | | | | | not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 llvm-svn: 200797
* Clean up whitespace checksJustin Bogner2014-02-041-11/+5
| | | | | | | | | | | | | In TokenLexer::ExpandFunctionArguments(), CurTok.hasLeadingSpace() is checked in multiple locations, each time subtly differently. Checking it early, when the token is seen, and using NextTokGetsSpace exclusively after that makes the code simpler. No change in behaviour is intended. Patch by Harald van Dijk! llvm-svn: 200788
* Fix whitespace handling in empty macro expansionsJustin Bogner2014-02-041-2/+6
| | | | | | | | | | | | | When a macro expansion does not result in any tokens, and the macro name is preceded by whitespace, the whitespace should be passed to the first token that follows the macro expansion. Similarly when a macro expansion ends with a placemarker token, and that placemarker token is preceded by whitespace. This worked already for top-level macro expansions, but is now extended to also work for nested macro expansions. Patch by Harald van Dijk! llvm-svn: 200787
* Fix whitespace handling in empty macro argumentsJustin Bogner2014-02-041-18/+13
| | | | | | | | | | | | | When a function-like macro definition ends with one of the macro's parameters, and the argument is empty, any whitespace before the parameter name in the macro definition needs to be preserved. Promoting the existing NextTokGetsSpace to a preserved bit-field and checking it at the end of the macro expansion allows it to be moved to the first token following the macro expansion result. Patch by Harald van Dijk! llvm-svn: 200786
* Fix whitespace handling in ## operatorJustin Bogner2014-02-041-13/+16
| | | | | | | | | | | | | | | | | In x ## y, where x and y are regular tokens, whitespace between x and ## is ignored, and whitespace between ## and y is also ignored. When either x or y is a function argument, whitespace was preserved, but it should not be. This patch removes the checks for whitespace before ## and before y, and in the special case where x is an empty macro argument and y is a regular token, actively removes whitespace before y. One existing test is affected by that change, but as clang's output now matches the standard's requirements and that of GCC, I've tweaked the testcase. Patch by Harald van Dijk! llvm-svn: 200785
* ARM & AArch64: combine implementation of vcaXYZ intrinsicsTim Northover2014-02-041-80/+24
| | | | | | | | Now that the back-end intrinsics are more regular, there's no need for the special handling these got in the front-end, so they can be moved to EmitCommonNeonBuiltinExpr. llvm-svn: 200769
* Add implicit declarations of allocation functions when looking them up forRichard Smith2014-02-044-38/+44
| | | | | | | | redeclaration, not just when looking them up for a use -- we need the implicit declaration to appropriately check various properties of them (notably, whether they're deleted). llvm-svn: 200729
* Tidy up and reduce some comment redundancy.Richard Smith2014-02-031-34/+29
| | | | llvm-svn: 200723
* Fix a -Wmicrosoft warning about an unrepresentable enum valueReid Kleckner2014-02-031-1/+1
| | | | | | In MSVC, enums are always signed unless you explicitly specify the type. llvm-svn: 200719
* Fix a -Wformat warning in ASTUnit.cppReid Kleckner2014-02-031-2/+2
| | | | | | | | | | llvm::sys::cas_flag is 'long' instead of 'uint32_t' on win32, because that's what InterlockedIncrement is defined to accept. I still don't know if we should be calling fprintf from ASTUnit.cpp behind a getenv check. llvm-svn: 200718
* PR17846, PR17848: don't build a VarTemplateSpecializationDecl for a use of aRichard Smith2014-02-031-4/+7
| | | | | | variable template until we know what the template arguments actually are. llvm-svn: 200714
* [ms-cxxabi] Fix cast when structor replacement is an aliasReid Kleckner2014-02-031-4/+8
| | | | llvm-svn: 200711
* Allow specifying a custom PathDiagnosticConsumer for use with the static ↵Alexander Kornienko2014-02-031-19/+27
| | | | | | | | | | | | | | | | | analyzer. Summary: Make objects returned by CreateAnalysisConsumer expose an interface, that allows providing a custom PathDiagnosticConsumer, so that users can have raw data in a form easily usable from the code (unlike plist/HTML in a file). Reviewers: jordan_rose, krememek CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2556 llvm-svn: 200710
* ARM: implement support for crypto intrinsics in arm_neon.hTim Northover2014-02-032-33/+58
| | | | llvm-svn: 200708
* AArch64: use new non-polymorphic crypto intrinsicsTim Northover2014-02-031-14/+14
| | | | | | | The LLVM backend now has invariant types on the various crypto-intrinsics, because in all cases there's only really one interpretation. llvm-svn: 200707
OpenPOWER on IntegriCloud