summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* check-clang: Introduce the feature "utf8-capable-terminal".NAKAMURA Takumi2014-02-062-0/+6
| | | | | | | | | | clang/test/FixIt/fixit-unicode-with-utf8-output.c has begun complained since LLVM r200885. Although it is changes for StringRef, it brought LLVM_ON_WIN32 to Support/Locale.cpp. Before r200885, LLVM_ON_WIN32 was undefined in Locale.cpp! FIXME: We should consider i18n on win32. llvm-svn: 200909
* Allow transformation of VariableArray to ConstantArray.Serge Pavlov2014-02-062-1/+24
| | | | | | | | | | | | | | | | | 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-067-26/+55
| | | | | | | | 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-0516-14/+114
| | | | | | | | | 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
* Try to fix ppc bot failure.Manman Ren2014-02-051-4/+4
| | | | llvm-svn: 200880
* Clean up some particularly ugly casting.Benjamin Kramer2014-02-052-19/+6
| | | | | | No functionality change. llvm-svn: 200877
* Changed OptionCategory variables to be static.Alexander Kornienko2014-02-051-2/+2
| | | | llvm-svn: 200876
* PGO: instrumentation based profiling sets function attributes.Manman Ren2014-02-055-1/+146
| | | | | | | | | | | | | | | 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-052-4/+26
| | | | | | | | 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-052-1/+9
| | | | | | | | | 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
* Update for llvm api change.Rafael Espindola2014-02-051-1/+0
| | | | llvm-svn: 200863
* Remove unused variable to fix -Werror buildReid Kleckner2014-02-051-3/+0
| | | | llvm-svn: 200861
* MS ABI: Mangle member pointer template argumentsReid Kleckner2014-02-0511-138/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Objective-C driver. Do not use legacy dispatch forFariborz Jahanian2014-02-052-2/+10
| | | | | | 10.5 or less for x86_64 arch. // rdar://15852259 llvm-svn: 200854
* Added the hasLoopVariable sub-matcher for forRangeStmt.Alexander Kornienko2014-02-052-9/+28
| | | | | | | | | | | | | | | | | | | Summary: This sub-matcher makes it possible to access directly the range-based for loop variable: forRangeStmt(hasLoopVariable(anything()).bind(...)). I've tried to re-generate the docs, but the diffs seem to include much more than this change could cause, so I'd better leave docs update to someone who knows the intended changes in the contents better. Reviewers: klimek Reviewed By: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2702 llvm-svn: 200850
* Fix the range for Malayam UCNs in C99.Joey Gouly2014-02-052-2/+2
| | | | llvm-svn: 200845
* clang-format: Don't indent relative to unary operators.Daniel Jasper2014-02-052-6/+3
| | | | | | | | | | | | | | 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
* Make the OptionCategory variable static.Alexander Kornienko2014-02-051-1/+1
| | | | llvm-svn: 200839
* 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-052-7/+29
| | | | | | | | | 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-046-104/+149
| | | | | | | | | | | | | | | | | | | | 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
* Further simplify r200797 and add an explanatory comment.David Blaikie2014-02-041-23/+17
| | | | llvm-svn: 200805
* Simplify testcase from r200797 some more.Adrian Prantl2014-02-041-12/+9
| | | | llvm-svn: 200798
* Debug info: fix a crasher when when emitting debug info forAdrian Prantl2014-02-042-3/+40
| | | | | | | | 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-042-5/+39
| | | | | | | | | | | | | 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-043-18/+35
| | | | | | | | | | | | | 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-043-16/+33
| | | | | | | | | | | | | | | | | 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
* [CMake] add_clang_library(): Fix LLVM_PLUGIN_EXT in MODULE. It was broken ↵NAKAMURA Takumi2014-02-041-1/+1
| | | | | | since my r199902. llvm-svn: 200760
* [CMake] add_clang_library(): Honor STATIC.NAKAMURA Takumi2014-02-041-0/+2
| | | | llvm-svn: 200759
* Add implicit declarations of allocation functions when looking them up forRichard Smith2014-02-048-46/+62
| | | | | | | | 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
* DebugInfo: Fix for an improvement to DIBuilder to not emit {i32 0} for ↵David Blaikie2014-02-032-2/+2
| | | | | | zero-length arrays. llvm-svn: 200722
* 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-032-4/+43
| | | | | | 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-033-6/+34
| | | | llvm-svn: 200711
* Allow specifying a custom PathDiagnosticConsumer for use with the static ↵Alexander Kornienko2014-02-033-24/+39
| | | | | | | | | | | | | | | | | 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
* Test cases for NetBSD/eARM Joerg Sonnenberger2014-02-031-0/+74
| | | | llvm-svn: 200709
* ARM: implement support for crypto intrinsics in arm_neon.hTim Northover2014-02-035-130/+157
| | | | 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
* Fix handling of -fno-function-sections, -fno-data-sections in clang driver.Evgeniy Stepanov2014-02-032-2/+71
| | | | llvm-svn: 200685
* Fix typo 'uusal'.Richard Smith2014-02-031-2/+2
| | | | llvm-svn: 200681
* Fix typo in CSS class name.Richard Smith2014-02-031-2/+2
| | | | llvm-svn: 200680
* Clang 3.4 was released, make the boxes green.Richard Smith2014-02-031-11/+11
| | | | llvm-svn: 200679
* Tests for DR331-350.Richard Smith2014-02-032-16/+213
| | | | llvm-svn: 200678
OpenPOWER on IntegriCloud