summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Thread safety: move the inline function back into a namespaceReid Kleckner2014-04-091-3/+3
| | | | | | | | Moving it into a struct makes things work because it implicitly marks the function as inline. The struct is unnecessary if you explicitly mark the function inline. llvm-svn: 205935
* [MS-ABI] Update to alias-avoidance paddingWarren Hunt2014-04-092-16/+275
| | | | | | | | | | This patch changes how we determine if padding is needed between two bases in msvc compatibility mode. Test cases included. In addition, a very minor change to the printing of structures to ease lit testing. llvm-svn: 205933
* Switching back from a static namespace-scoped function to a static ↵Aaron Ballman2014-04-091-6/+6
| | | | | | class-scope function. No functional change, but resolves a warning. llvm-svn: 205931
* Thread Safety Analysis: now with less includes. No functional changes.Aaron Ballman2014-04-093-15/+1
| | | | llvm-svn: 205929
* clang-cl: Disable TBAA by default for MSVC compatibilityReid Kleckner2014-04-093-3/+16
| | | | | | | MSVC doesn't have an option to enable TBAA, so make -fstrict-aliasing and -fno-strict-aliasing available in clang-cl. llvm-svn: 205924
* Handle difference in signedness of 'char' in test/Index/print-type.c{,pp}Anders Waldenborg2014-04-092-2/+2
| | | | llvm-svn: 205922
* Make c-index-test -test-print-type include pointeekind for pointer typesAnders Waldenborg2014-04-094-16/+23
| | | | | | | | | The idea is to give visibility to more type kinds, especially for getting a better grasp of what appears as unexposed type kind with libclang. Differential Revision: http://reviews.llvm.org/D3325 llvm-svn: 205921
* Add a -triple argument so that this new test passes on Darwin.Bob Wilson2014-04-091-1/+1
| | | | | | The section names used here are not valid for Mach-O. llvm-svn: 205920
* [Preprocessor/CodeComplete] Don't add include guard macros to ↵Argyrios Kyrtzidis2014-04-098-12/+41
| | | | | | code-completion results. llvm-svn: 205917
* Cannot have the base class destructor be private (or explicitly deleted); ↵Aaron Ballman2014-04-091-4/+0
| | | | | | fixing the build bots. llvm-svn: 205916
* Thread Safety Analysis: some minor cleanups to the latest thread safety ↵Aaron Ballman2014-04-094-101/+99
| | | | | | | | | | | | changes. No functional changes intended. * Adds an iterator_range interface to CallExpr to get the arguments * Modifies SExpr such that it must be allocated in the Arena, and cannot be deleted * Minor const-correctness and nullptr updates * Adds some operator!= implementations to complement operator== * Removes unused functionality llvm-svn: 205915
* clang-format: Update flag documentation, and generation script.Daniel Jasper2014-04-093-12/+36
| | | | llvm-svn: 205853
* clang-format: Treat a trailing comment like a trailing comma in braced lists.Daniel Jasper2014-04-092-8/+14
| | | | | | | | | | | | | | | | | Before: static StructInitInfo module = {MODULE_BUILTIN, /* type */ "streams" /* name */ }; After: static StructInitInfo module = { MODULE_BUILTIN, /* type */ "streams" /* name */ }; This fixes llvm.org/PR19378. llvm-svn: 205851
* clang-format: Fix bug where clang-format would break the code.Daniel Jasper2014-04-092-0/+7
| | | | | | | | | | | | Before, it would turn: SomeFunction([]() { // Cool function.. return 43; }); Into this: SomeFunction([]() { // Cool function.. return 43; }); llvm-svn: 205849
* clang-format: Improve format of calls with several lambdas.Daniel Jasper2014-04-093-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | Before: SomeFunction([]() { int i = 42; return i; }, []() { int j = 43; return j; }); After: SomeFunction([]() { int i = 42; return i; }, []() { int j = 43; return j; }); llvm-svn: 205848
* clang-format: Allow breaking between trailing annotations in more cases.Daniel Jasper2014-04-092-5/+7
| | | | | | | | | | | | Before: void aaaaaaaaaaaaaa(aaaaaaaa aaa) override AAAAAAAAAAAAAAAAAAAAAAAA( aaaaaaaaaaaaaaa); After: void aaaaaaaaaaaaaa(aaaaaaaa aaa) override AAAAAAAAAAAAAAAAAAAAAAAA(aaaaaaaaaaaaaaa); llvm-svn: 205846
* clang-format: Keep more trailing annotations on the same line.Daniel Jasper2014-04-092-4/+8
| | | | | | | | | | | | | | | | | | | | More precisely keep all short annotations (<10 characters) on the same line if possible. Previously, clang-format would only prefer to do so for "const", "override" and "final". However, it seems to be generally preferable, especially because some codebases have to wrap those in macros for backwards compatibility. Before: void someLongFunction(int someLongParameter) OVERRIDE {} After: void someLongFunction( int someLongParameter) OVERRIDE {} This fixes llvm.org/PR19363. llvm-svn: 205845
* clang-format: Recognize lists ending in trailing commas correctly.Daniel Jasper2014-04-092-12/+17
| | | | | | | Previously, this did not look through trailing comments leading to a few formatting oddities. llvm-svn: 205843
* clang-format: Add proto files and JavaScript to git-clang-format.Daniel Jasper2014-04-091-0/+3
| | | | llvm-svn: 205842
* Sema::SectionInfo() should have an empty body. Sorry for the breakage.NAKAMURA Takumi2014-04-091-1/+1
| | | | llvm-svn: 205841
* Sema::SectionInfo: Prune "default" for now. Defaulted function is ↵NAKAMURA Takumi2014-04-091-1/+1
| | | | | | unavailable on msc17. llvm-svn: 205840
* Add missing include.Richard Trieu2014-04-091-0/+1
| | | | llvm-svn: 205828
* [analyzer] When checking Foundation method calls, match the selectors exactly.Jordan Rose2014-04-095-76/+162
| | | | | | | | | | This also includes some infrastructure to make it easier to build multi-argument selectors, rather than trying to use string matching on each piece. There's a bit more setup code, but less cost at runtime. PR18908 llvm-svn: 205827
* [MS-ABI] Lit fix for r205810Warren Hunt2014-04-081-1/+1
| | | | | | | On linux strings have different linkage than on windows. This patch makes the lit test more general. llvm-svn: 205812
* [MS-ABI] Add support for #pragma section and related pragmasWarren Hunt2014-04-0818-41/+603
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the msvc pragmas section, bss_seg, code_seg, const_seg and data_seg as well as support for __declspec(allocate()). Additionally it corrects semantics and adds diagnostics for __attribute__((section())) and the interaction between the attribute and the msvc pragmas and declspec. In general conflicts should now be well diganosed within and among these features. In supporting the pragmas new machinery for uniform lexing for msvc pragmas was introduced. The new machinery always lexes the entire pragma and stores it on an annotation token. The parser is responsible for parsing the pragma when the handling the annotation token. There is a known outstanding bug in this implementation in C mode. Because these attributes and pragmas apply _only_ to definitions, we process them at the time we detect a definition. Due to tentative definitions in C, we end up processing the definition late. This means that in C mode, everything that ends up in a BSS section will end up in the _last_ BSS section rather than the one that was live at the time of tentative definition, even if that turns out to be the point of actual definition. This issue is not known to impact anything as of yet because we are not aware of a clear use or use case for #pragma bss_seg but should be fixed at some point. Differential Revision=http://reviews.llvm.org/D3065#inline-16241 llvm-svn: 205810
* Thread Safety Analysis. Misc fixes to SExpr code, responding to code reviewDeLesley Hutchins2014-04-083-88/+83
| | | | | | by Aaron Ballman. llvm-svn: 205809
* Fix the funcsig test with an explicit tripleReid Kleckner2014-04-081-1/+1
| | | | llvm-svn: 205781
* Add support for MSVC's __FUNCSIG__Reid Kleckner2014-04-0810-23/+65
| | | | | | | | | | | It is very similar to GCC's __PRETTY_FUNCTION__, except it prints the calling convention. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D3311 llvm-svn: 205780
* intrin.h: Fix up bugs in the cr3 and msr intrinsicsReid Kleckner2014-04-081-9/+6
| | | | | | | | | | | Don't include input and output regs in clobbers. Prefix some identifiers with __. Add a memory constraint to __readcr3 to prevent reordering. This constraint is heavy handed, but conservatively correct. Thanks to PaX Team for the suggestions. llvm-svn: 205778
* Have validate-system-headers override validate-once-per-build-sessionBen Langmuir2014-04-082-1/+19
| | | | llvm-svn: 205773
* clang-format: Fix incorrect multi-block-parameter computation.Daniel Jasper2014-04-082-3/+8
| | | | llvm-svn: 205763
* If a header is explicitly included in module A, and excluded from an umbrellaRichard Smith2014-04-088-7/+40
| | | | | | directory in module B, don't include it in module B! llvm-svn: 205762
* clang-format: Correctly understand arrays of pointers.Daniel Jasper2014-04-082-1/+2
| | | | | | | | | | | | Before: A<int * []> a; After: A<int *[]> a; This fixes llvm.org/PR19360. llvm-svn: 205761
* clang-format: Extend AllowShortFunctions.. to only merge inline functions.Daniel Jasper2014-04-084-15/+67
| | | | | | | | | | | | | | | | | Before AllowShortFunctionsOnASingleLine could either be true, merging all functions, or false, merging no functions. This patch adds a third value "Inline", which can be used to only merge short functions defined inline in a class, i.e.: void f() { return 42; } class C { void f() { return 42; } }; llvm-svn: 205760
* PR19346: Adding 0 to a null pointer has defined behavior in C++. Allow it in ↵Richard Smith2014-04-082-3/+5
| | | | | | constant expressions. llvm-svn: 205757
* intrin.h: Implement __readmsr, __readcr3, and __writecr3Reid Kleckner2014-04-081-0/+35
| | | | | | | | Fixes PR19301. Based on a patch from Steven Graf! llvm-svn: 205751
* Thread Safety Analysis: various fixes to new SExpr code.DeLesley Hutchins2014-04-073-227/+377
| | | | | | Implemented ownership policy, updated to use nullptr, const-cleanup. llvm-svn: 205745
* Thread Safety Analysis: fix warning.DeLesley Hutchins2014-04-071-1/+1
| | | | llvm-svn: 205733
* -fms-extensions: Don't define __PRETTY_FUNCTION__ to __FUNCTION__Reid Kleckner2014-04-072-4/+1
| | | | | | | This reverts r90596 from 2009. Having this macro definition makes Clang strictly less useful with -fms-extensions. llvm-svn: 205729
* Thread Safety Analysis: update to internal SExpr handling.DeLesley Hutchins2014-04-076-8/+2542
| | | | | | | | | | This patch is the first part of a significant refactoring that seeks to restore sanity to way thread safety analysis deals with capability expressions. The current patch merely provides an outline of the structure of the new system. It's not yet connected to the actual analysis, so there's no change in functionality. llvm-svn: 205728
* Mangle the vbptr offset into pointers to member functionsReid Kleckner2014-04-072-6/+33
| | | | | | | | This can actually be non-zero if you override a function from a virtual base and you have forced the most_general pointer to member representation. llvm-svn: 205727
* [analyzer] Fix mistake in example for potential checker "posix.Errno".Jordan Rose2014-04-071-1/+1
| | | | | | Found by Richard Osbourne! llvm-svn: 205721
* [analyzer] Re-enable test I accidentally committed commented-out.Jordan Rose2014-04-071-5/+5
| | | | | | Thanks, Alex! llvm-svn: 205720
* Revert r205646 (keeping the test in its modified form) asFariborz Jahanian2014-04-072-12/+3
| | | | | | it is subsumed by r205521. llvm-svn: 205718
* Fix a typo introduced in r205716David Majnemer2014-04-071-3/+2
| | | | llvm-svn: 205717
* clang-cl: make /Gw map to -fdata-sectionsDavid Majnemer2014-04-074-9/+18
| | | | | | Note that /Gy no longer implies -fdata-sections. llvm-svn: 205716
* Fix clang-tidy warning (argument comments don't match parameter names).Richard Smith2014-04-072-5/+5
| | | | llvm-svn: 205715
* libclang: add clang_CXXMethod_isConst API that allows to determine if a C++Dmitri Gribenko2014-04-076-13/+54
| | | | | | | | member function or member function template is declared 'const' Patch by Kevin Funk with testcase updates by me. llvm-svn: 205714
* Updated phabricator server.Serge Pavlov2014-04-071-1/+1
| | | | llvm-svn: 205695
* DebugInfo: Support type alias templatesDavid Blaikie2014-04-063-4/+64
| | | | | | | | We already got the type alias correct (though I've included a test case here) since Clang represents that like any other typedef - but type alias templates weren't being handled. llvm-svn: 205691
OpenPOWER on IntegriCloud