summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Add unused markings to suppress warnings.Eli Friedman2013-09-102-4/+10
| | | | | | | | | | trunk clang is a bit more aggressive about emitting unused-declaration warnings, so adjust some AST code to match. Specifically, use LLVM_ATTRIBUTE_UNUSED for declarations which are never supposed to be referenced, and turn references to declarations which are supposed to be referenced into odr-uses. llvm-svn: 190443
* Ignore noreturn when checking function template specializationsReid Kleckner2013-09-102-2/+13
| | | | | | | | | | As requested when applying the same logic to calling conventions. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1634 llvm-svn: 190441
* PR5683: Issue a warning when subtracting pointers to types of zero size, andRichard Smith2013-09-106-1/+86
| | | | | | | treat such subtractions as being non-constant. Patch by Serge Pavlov! With a few tweaks by me. llvm-svn: 190439
* Fix regression from r190382.Eli Friedman2013-09-103-8/+18
| | | | | | | | | Make sure we perform the correct "referenced-but-not-used" check for static member constants. Fixes bug reported on cfe-commits by Alexey Samsonov. llvm-svn: 190437
* Fix cl-link.c test failure on Mac platformsHans Wennborg2013-09-101-2/+2
| | | | | | | The test filename (%s) is easily confused with an option when it starts with /Users... llvm-svn: 190435
* [ms-cxxabi] Mangle dynamic initializer stubs the same way MSVC doesReid Kleckner2013-09-105-11/+44
| | | | | | | | | | | | Summary: Dynamic initializers are mangled as ??__E <name> YAXXZ. Reviewers: timurrrr CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1477 llvm-svn: 190434
* Remove Windows line-endings in two clang-cl test files.Hans Wennborg2013-09-102-121/+121
| | | | llvm-svn: 190432
* clang-cl: Support building DLLs (PR17083)Hans Wennborg2013-09-106-15/+139
| | | | | | | | This adds driver support for building DLLs (the /LD and /LDd flags). It basically does two things: runtime selection and passing -dll and -implib to the linker. llvm-svn: 190428
* [ms-cxxabi] Implement guard variables for static initializationReid Kleckner2013-09-1020-57/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | Static locals requiring initialization are not thread safe on Windows. Unfortunately, it's possible to create static locals that are actually externally visible with inline functions and templates. As a result, we have to implement an initialization guard scheme that is compatible with TUs built by MSVC, which makes thread safety prohibitively difficult. MSVC's scheme is that every function that requires a guard gets an i32 bitfield. Each static local is assigned a bit that indicates if it has been initialized, up to 32 bits, at which point a new bitfield is created. MSVC rejects inline functions with more than 32 static locals, and the externally visible mangling (?_B) only allows for one guard variable per function. On Eli's recommendation, I used MangleNumberingContext to track which bit each static corresponds to. Implements PR16888. Reviewers: rjmccall, eli.friedman Differential Revision: http://llvm-reviews.chandlerc.com/D1416 llvm-svn: 190427
* ObjectiveC migrator: rename inferred isXXX property,Fariborz Jahanian2013-09-103-2/+4
| | | | | | with a suitable 'getter' attribute. llvm-svn: 190420
* Allow _clang-format as alternative to .clang-format config filenameHans Wennborg2013-09-107-9/+27
| | | | | | | | | | | Dotfiles are impractical on Windows. This makes clang-format search for the style configuration file as '_clang-format' in addition to the usual '.clang-format'. This is similar to how VIM searches for '_vimrc' on Windows. Differential Revision: http://llvm-reviews.chandlerc.com/D1629 llvm-svn: 190413
* Don't divide L and #x in macro definitions. Fixes http://llvm.org/PR17144Alexander Kornienko2013-09-102-0/+3
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1639 llvm-svn: 190408
* Correctly calculate OriginalColumn after multi-line tokens.Alexander Kornienko2013-09-104-39/+55
| | | | | | | | | | | | | | Summary: This also unifies the handling of escaped newlines for all tokens. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1638 llvm-svn: 190405
* clang-format: Understand function type typedefs with typeof.Daniel Jasper2013-09-102-0/+6
| | | | | | | | | | | Before: typedef typeof(int(int, int)) * MyFunc; After: typedef typeof(int(int, int)) *MyFunc; This fixes llvm.org/PR17178. llvm-svn: 190401
* [mips][msa] Removed unsupported dot product instructions (dotp_[su].b).Daniel Sanders2013-09-102-4/+0
| | | | | | The dotp_[su].b instructions never existed in any revision of the MSA spec. llvm-svn: 190399
* Calculate and store ColumnWidth instead of CodePointCount in FormatTokens.Alexander Kornienko2013-09-107-97/+109
| | | | | | | | | | | | | | | | Summary: This fixes various issues with mixed tabs and spaces handling, e.g. when realigning block comments. Reviewers: klimek, djasper Reviewed By: djasper CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1608 llvm-svn: 190395
* Delete unused static class membersAlexey Samsonov2013-09-101-2/+0
| | | | llvm-svn: 190394
* Rejected 190391, due to failures on ↵Stepan Dyatkovskiy2013-09-101-12/+65
| | | | | | clang-x86_64-darwin11-nobootstrap-RAincremental. llvm-svn: 190393
* Fix for PR16752. Second commit.Stepan Dyatkovskiy2013-09-101-65/+12
| | | | | | | | | | | | | | | | | | | | | PR16752: 'mode' attribute for unusual targets doesn't work properly Description: Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp). For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only. Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct. Please consider the next solution: 1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width. 2. Fix handleModeAttr according to new methods in TargetInfo. Fixes: 1st Commit (Done): Add new methods for TargetInfo: getRealTypeByWidth and getIntTypeByWidth for ASTContext names are almost same(invokes new methods from TargetInfo): getIntTypeForBitwidth and getRealTypeForBitwidth 2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function. llvm-svn: 190391
* Fix minor coding style issue in r190296 pointed out by Richard Smith.David Tweed2013-09-101-4/+4
| | | | llvm-svn: 190390
* Separate popcnt and sse4.2 feature control somewhat to match gcc behavior.Craig Topper2013-09-102-2/+23
| | | | | | | Enabling sse4.2 will implicitly enable popcnt unless popcnt is explicitly disabled. Disabling sse4.2 will not disable popcnt if popcnt is explicitly enabled. llvm-svn: 190387
* Generate code for the move assignment operator using memcpy, the same as we doNick Lewycky2013-09-102-1/+28
| | | | | | for the copy assignment operator. llvm-svn: 190385
* Make -Wunused warning rules more consistent.Eli Friedman2013-09-104-45/+71
| | | | | | | | | | | | | | | This patch does a few different things. This patch improves unused var diags for const vars: we no longer unconditionally suppress diagnostics for const vars, instead only suppressing the diagnostic when the declaration appears to be useful. This patch also makes us more consistently use whether a variable/function is declared in the main file to suppress diagnostics where appropriate. Fixes <rdar://problem/14907887>. llvm-svn: 190382
* clang-cl: use -fdiagnostics-format=msvc by defaultHans Wennborg2013-09-102-2/+8
| | | | | | | This allows for navigating to errors within the MSVC IDE by clicking on the diagnostics. llvm-svn: 190378
* Ignore calling conventions when checking function template specializationsReid Kleckner2013-09-102-3/+29
| | | | | | | | | | | | | | | | | | | | Summary: Calling conventions are inherited during decl merging. Before this change, deduction would fail due to a type mismatch between the template and the specialization. This change adjusts the CCs to match before deduction, and lets the decl merging logic diagnose mismatch or inherit the CC from the template. This allows specializations of static member function templates in the Microsoft C++ ABI. Reviewers: rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1570 llvm-svn: 190377
* ObjectiveC migrator. Do not infer NS_RETURNS_INNER_POINTERFariborz Jahanian2013-09-093-0/+34
| | | | | | | annotation on methods which return typedef of pointer to an incomplete struct type. llvm-svn: 190372
* Attempting to unbreak the makefile-base builds.Aaron Ballman2013-09-091-1/+6
| | | | llvm-svn: 190370
* Adding a FIXME based on feedback from Richard Smith.Aaron Ballman2013-09-091-0/+3
| | | | llvm-svn: 190369
* Attribute tablegen now understands that attribute arguments can be optional. ↵Aaron Ballman2013-09-0910-271/+238
| | | | | | This allows for automated checking of the number of arguments expected vs number of arguments given for attributes. Greatly reduces the amount of manual checking required. llvm-svn: 190368
* Fix a crash introduced in r189828.Matt Beaumont-Gay2013-09-092-1/+6
| | | | | | | The predicates in CXXRecordDecl which test various properties of special members can't be called on incomplete decls. llvm-svn: 190353
* Modern ObjectiveC translator. Fix translation of Fariborz Jahanian2013-09-092-36/+84
| | | | | | | | message sent to aggregate-valued methods. Fix visibility of trampoline type used in translation of such expressions. // rdar://14932320 llvm-svn: 190341
* [docs] Prominently note modules are experimental.Sean Silva2013-09-091-6/+6
| | | | | | | | | | It was really hard to tell that modules are experimental. This makes it really clear by * Noting the experimental status in the title. * Moving the "warning" above the table of contents. llvm-svn: 190340
* [docs] End users should see just "Clang"Sean Silva2013-09-091-1/+1
| | | | | | | | | Half the internet has wildly incorrect ideas about what LLVM is (in particular, many get the impression that LLVM is some magical cross-platform runtime), so saying "LLVM" near "cross-compilation" in a user-facing doc might provoke confusion. llvm-svn: 190338
* [docs] Fix Sphinx toctree warning.Sean Silva2013-09-091-0/+5
| | | | | | | | Last I heard LSan is getting close to prime-time, but for now keep LeakSanitizer.rst hidden (especially since it contains so little content). llvm-svn: 190337
* [docs] Fix some finicky Sphinx warnings.Sean Silva2013-09-092-1/+2
| | | | llvm-svn: 190336
* [docs] Typographical and rewording fixes.Sean Silva2013-09-091-41/+42
| | | | llvm-svn: 190333
* clang-cl: parse (but don't support) the /o flagHans Wennborg2013-09-092-0/+2
| | | | | | | | | | | | | | | | Apparently folks run into this (PR17097). The flag is not supported by MSVC either, but we should parse it so we don't get confused when it occurs. This changes the clang-cl output for "clang-cl /c /o foo.obj" from: clang-cl.exe: error: no such file or directory: '/o' clang-cl.exe: error: no such file or directory: 'foo.obj' to: clang-cl.exe: warning: argument unused during compilation: '/o bajs.obj' llvm-svn: 190323
* Move checker downloads to llvm.org.Ted Kremenek2013-09-092-2/+2
| | | | llvm-svn: 190316
* C++ modules: if a class is defined in multiple modules (for instance, becauseRichard Smith2013-09-0912-100/+196
| | | | | | | | | | | | it is an implicit instantiation of a class template specialization), pick the first-loaded definition to be the canonical definition, and merge all other definitions into it. This is still rather incomplete -- we need to extend every form of declaration that can appear within a CXXRecordDecl to be redeclarable if it came from an AST file (this includes fields, enumerators, ...). llvm-svn: 190315
* CGDebugInfo: Hoist string allocation in a helper function. No functionality ↵Benjamin Kramer2013-09-092-32/+19
| | | | | | change. llvm-svn: 190314
* Sema: Don't crash on visibility attributes with an identifier argument.Benjamin Kramer2013-09-092-3/+6
| | | | | | PR17105. llvm-svn: 190312
* Fix constructor-related typos.Benjamin Kramer2013-09-0911-37/+37
| | | | | | Noticed by Roman Divacky. llvm-svn: 190311
* Silencing an MSVC warning about an empty control statement (it dislikes ; ↵Aaron Ballman2013-09-091-2/+2
| | | | | | but is fine with {}). llvm-svn: 190305
* Removing the endian attribute and updating associated test cases. This ↵Aaron Ballman2013-09-094-43/+2
| | | | | | functionality was never completely implemented, and this is an improvement over silently eating the attribute. llvm-svn: 190303
* Commit 190296 missed out the tests; add them now. Note that it actually testsDavid Tweed2013-09-091-0/+19
| | | | | | | | "long long" which is currently technically only "reserved for future" use in OpenCL, but since clang in OpenCL mode supports it we may as well test the modifications to the settings made for that type. llvm-svn: 190297
* The OpenCL standard specifies the sizes and alignments of various types than ↵David Tweed2013-09-093-4/+33
| | | | | | | | | | | other C-family languages, as well as specifying errno is not set by the math functions. Make the clang front-end set those appropriately when the OpenCL language option is set. Patch by Erik Schnetter! llvm-svn: 190296
* Additional fix for PR16752 and for commit 190044:Stepan Dyatkovskiy2013-09-091-1/+2
| | | | | | -- For TargetInfo::getRealTypeByWidth also added support for IEEEQuad float type. llvm-svn: 190294
* C++ modules: fix a bug where loading a declaration with some name would preventRichard Smith2013-09-098-28/+94
| | | | | | | | | | | | | | | | | name lookup from lazily deserializing the other declarations with the same name, by tracking a bit to indicate whether a name in a DeclContext might have additional external results. This also allows lazier reconciling of the lookup table if a module import adds decls to a pre-existing DC. However, this exposes a pre-existing bug, which causes a regression in test/Modules/decldef.mm: if we have a reference to a declaration, and a later-imported module adds a redeclaration, nothing causes us to load that redeclaration when we use or emit the reference (which can manifest as a reference to an undefined inline function, a use of an incomplete type, and so on). decldef.mm has been extended with an additional testcase which fails with or without this change. llvm-svn: 190293
* Update to the new API interface which requires the MCRegisterInfo object. ↵Bill Wendling2013-09-091-2/+3
| | | | | | <rdar://problem/13623355> llvm-svn: 190291
* Implement aarch64 neon instruction set AdvSIMD (3V Diff), covering the ↵Jiangning Liu2013-09-094-15/+1199
| | | | | | | | following 26 instructions, SADDL, UADDL, SADDW, UADDW, SSUBL, USUBL, SSUBW, USUBW, ADDHN, RADDHN, SABAL, UABAL, SUBHN, RSUBHN, SABDL, UABDL, SMLAL, UMLAL, SMLSL, UMLSL, SQDMLAL, SQDMLSL, SMULL, UMULL, SQDMULL, PMULL llvm-svn: 190289
OpenPOWER on IntegriCloud