summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Create UsersManual section entitled 'Controlling Floating PointErich Keane2019-09-171-30/+159
| | | | | | | | | | | | | | Behavior' Create a new section for documenting the floating point options. Move all the floating point options into this section, and add new entries for the floating point options that exist but weren't previously described in the UsersManual. Patch By: mibintc Differential Revision: https://reviews.llvm.org/D67517 llvm-svn: 372180
* Ignore exception specifier mismatch when merging redeclarationsReid Kleckner2019-09-172-2/+34
| | | | | | | | | | | | | | | | | | Exception specifiers are now part of the function type in C++17. Normally, it is illegal to redeclare the same function or specialize a template with a different exception specifier, but under -fms-compatibility, we accept it with a warning. Without this change, the function types would not match due to the exception specifier, and clang would claim that the types were "incompatible". Now we emit the warning and merge the redeclaration as we would in C++14 and earlier. Fixes PR42842, which is about compiling _com_ptr_t in C++17. Based on a patch by Alex Fusco <alexfusco@google.com>! Differential Revision: https://reviews.llvm.org/D67590 llvm-svn: 372178
* [clang-scan-deps] Add verbose modeJan Korous2019-09-171-2/+9
| | | | | | | | When running in the default mode we don't print anything other than actual output to stdout to make automated processing easier. Differential Revision: https://reviews.llvm.org/D67522 llvm-svn: 372174
* Use 'BOOL' instead of BOOL in diagnostic messagesErik Pilkington2019-09-173-20/+20
| | | | | | Type names should be enclosed in single quotes. llvm-svn: 372152
* [OPENMP] Rework the test, NFC.Alexey Bataev2019-09-171-3/+1
| | | | llvm-svn: 372148
* [OPENMP5.0]Introduce attribute for declare variant directive.Alexey Bataev2019-09-1710-1/+334
| | | | | | | | Added attribute for declare variant directive. It will allow to handle declare variant directive at the codegen and will allow to add extra checks. llvm-svn: 372147
* [OPENMP]Try to rework the test to pacify the buildbots, NFC.Alexey Bataev2019-09-171-8/+7
| | | | llvm-svn: 372130
* [clang-format] Fix cleanup of `AnnotatedLine` to include children nodes.Yitzhak Mandelbaum2019-09-172-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: AnnotatedLine has a tree structure, and things like the body of a lambda will be a child of the lambda expression. For example, [&]() { foo(a); }; will have an AnnotatedLine with a child: [&]() {}; '- foo(a); Currently, when the `Cleaner` class analyzes the affected lines, it does not cleanup the lines' children nodes, which results in missed cleanup opportunities, like the lambda body in the example above. This revision extends the algorithm to visit children, thereby fixing the above problem. Patch by Eric Li. Reviewers: krasimir Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67659 llvm-svn: 372129
* Add SpellingNotCalculated to Attribute Enums to suppress UBSan warningsErich Keane2019-09-174-0/+16
| | | | | | | UBSan downstreams noticed that the assignment of SpellingNotCalculated to the spellings caused warnings. llvm-svn: 372124
* [OpenCL] Tidy up some comments; NFCSven van Haastregt2019-09-171-10/+4
| | | | llvm-svn: 372119
* Hide implementation details in namespaces.Benjamin Kramer2019-09-171-0/+2
| | | | llvm-svn: 372113
* [NFC] Updated testDavid Bolvansky2019-09-171-7/+7
| | | | llvm-svn: 372095
* [Clang] Pragma vectorize_width() implies vectorize(enable)Sjoerd Meijer2019-09-173-9/+38
| | | | | | | | | | | | Specifying the vectorization width was supposed to implicitly enable vectorization, except that it wasn't really doing this. It was only setting the vectorize.width metadata, but not vectorize.enable. This should fix PR27643. Differential Revision: https://reviews.llvm.org/D66290 llvm-svn: 372082
* [RISCV] Add option aliases: -mcmodel=medany and -mcmodel=medlowKito Cheng2019-09-172-0/+16
| | | | | | | | | | | | | | RISC-V GCC use -mcmodel=medany and -mcmodel=medlow, but LLVM use -mcmodel=small and -mcmodel=medium. Add those two option aliases for provide same user interface between GCC and LLVM. Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D67066 llvm-svn: 372080
* [RISCV] Define __riscv_cmodel_medlow and __riscv_cmodel_medany correctlyKito Cheng2019-09-172-2/+28
| | | | | | | | | | | | | | RISC-V LLVM was only implement small/medlow code model, so it defined __riscv_cmodel_medlow directly without check. Now, we have medium/medany code model in RISC-V back-end, it should define according the actually code model. Reviewed By: lewis-revill Differential Revision: https://reviews.llvm.org/D67065 llvm-svn: 372078
* Fix reliance on -flax-vector-conversions in AVX intrinsics headers andRichard Smith2019-09-174-16/+16
| | | | | | corresponding tests. llvm-svn: 372063
* Fix reliance on lax vector conversions in tests for x86 intrinsics.Richard Smith2019-09-178-15/+15
| | | | llvm-svn: 372062
* Remove reliance on lax vector conversions from altivec.h in VSX mode.Richard Smith2019-09-175-23/+43
| | | | llvm-svn: 372061
* Push lambda scope earlier when transforming lambda expressionNicholas Allegra2019-09-172-4/+19
| | | | | | Differential Revision: https://reviews.llvm.org/D66067 llvm-svn: 372058
* [OPENMP] Fix the test, NFCAlexey Bataev2019-09-171-3/+5
| | | | llvm-svn: 372055
* [OPENMP]Fix the test, NFC.Alexey Bataev2019-09-161-2/+3
| | | | llvm-svn: 372040
* [Modules][Objective-C] Use complete decl from module when diagnosing missing ↵Bruno Cardoso Lopes2019-09-166-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | import Summary: Otherwise the definition (first found) for ObjCInterfaceDecl's might precede the module one, which will eventually lead to crash, since diagnoseMissingImport needs one coming from a module. This behavior changed after Richard's r342018, which started to look into the definition of ObjCInterfaceDecls. rdar://problem/49237144 Reviewers: rsmith, arphaman Subscribers: jkorous, dexonsmith, ributzka, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66982 llvm-svn: 372039
* do not emit -Wunused-macros warnings in -frewrite-includes mode (PR15614)Lubos Lunak2019-09-162-2/+6
| | | | | | | | | | | -frewrite-includes calls PP.SetMacroExpansionOnlyInDirectives() to avoid macro expansions that are useless in that mode, but this can lead to -Wunused-macros false positives. As -frewrite-includes does not emit normal warnings, block -Wunused-macros too. Differential Revision: https://reviews.llvm.org/D65371 llvm-svn: 372026
* [Clang][Codegen] Disable arm_acle.c test.Roman Lebedev2019-09-161-0/+2
| | | | | | | | | | This test is broken by design. Clang codegen tests should not depend on llvm middle-end behaviour, they should *only* test clang codegen. Yet this test runs whole optimization pipeline. I've really tried to fix it, but there isn't just a few things that depend on passes, but everything there does. llvm-svn: 372015
* [Clang][Codegen] Relax available-externally-suppress.c testRoman Lebedev2019-09-161-2/+0
| | | | | | | | | That test is broken by design. It depends on llvm middle-end behavior. No clang codegen test should be doing that. This one is salvageable by relaxing check lines. llvm-svn: 372014
* [OPENMP]Fix parsing/sema for function templates with declare simd.Alexey Bataev2019-09-162-1/+10
| | | | | | | | Need to return original declaration group with FunctionTemplateDecl, not the inner FunctionDecl, to correctly handle parsing of directives with the templates parameters. llvm-svn: 372011
* Move some definitions from Sema to Basic to fix shared libs buildErich Keane2019-09-163-88/+91
| | | | | | | | r371875 moved some functionality around to a Basic header file, but didn't move its definitions as well. This patch moves some things around so that shared library building can work. llvm-svn: 371985
* [clangd] Fix a crash when renaming operator.Haojian Wu2019-09-161-2/+1
| | | | | | | | | | | | | | | | | | | | Summary: The renamelib uses a tricky way to calculate the end location by relying on decl name, this is incorrect for the overloaded operator (the name is "operator++" instead of "++"), which will cause out-of-file offset. We also disable renaming operator symbol, this case is tricky, and renamelib doesnt handle it properly. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67607 llvm-svn: 371971
* Change signature of __builtin_rotateright64 back to unsignedKarl-Johan Karlsson2019-09-162-1/+5
| | | | | | | | | | | | | | | | The signature of __builtin_rotateright64 was by misstake changed from unsigned to signed in r360863, this patch will change it back to unsigned as intended. This fixes pr43309 Reviewers: efriedma, hans Reviewed By: hans Differential Revision: https://reviews.llvm.org/D67606 llvm-svn: 371969
* [OpenMP] Fix OMPClauseReader::readClause() uninitialized variable warning. NFCI.Simon Pilgrim2019-09-151-1/+3
| | | | | | Fixes static analyzer uninitialized variable warning for the OMPClause - the function appears to cover all cases, but I've added an assertion to make sure. llvm-svn: 371934
* [Diagnostics] Added silence note for -Wsizeof-array-div; suggest extra parensDavid Bolvansky2019-09-142-3/+22
| | | | llvm-svn: 371924
* [clang-scan-deps] Add -M to work around -MT issue after r371918Fangrui Song2019-09-141-0/+1
| | | | | | | | | | | gcc will complain if -MT is used but neither -M nor -MM is specified: > cc1: error: to generate dependencies you must specify either -M or -MM r371918 changed our behavior to match GCC, but apparently clang-scan-deps is not happy. llvm-svn: 371920
* [Driver] Fix multiple bugs related to dependency file options: -M -MM -MD ↵Fangrui Song2019-09-143-36/+60
| | | | | | | | | | | -MMD -MT -MQ -M -o test.i => dependency file is test.d, not test.i -MM -o test.i => dependency file is test.d, not test.i -M -MMD => bogus warning -Wunused-command-line-argument -M MT dummy => -w not rendered llvm-svn: 371918
* [Driver] Improve Clang::getDependencyFileName and its tests after rC371853Fangrui Song2019-09-144-27/+18
| | | | | | | The test file name metadata-with-dots.c is confusing because -MD and -MMD have nothing to do with metadata. llvm-svn: 371917
* [WebAssembly] Narrowing and widening SIMD opsThomas Lively2019-09-133-0/+147
| | | | | | | | | | | | | | | | Summary: Implements target-specific LLVM intrinsics and clang builtins for these new SIMD operations, as described at https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#integer-to-integer-narrowing. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D67425 llvm-svn: 371906
* Make test check position independent as they sometimes come out reversed. NFCI.Douglas Yung2019-09-131-2/+2
| | | | llvm-svn: 371904
* [clang-scan-deps] Fix for headers having the same name as a directoryAlex Lorenz2019-09-135-0/+31
| | | | | | | | | | | | Scan deps tool crashes when called on a C++ file, containing an include that has the same name as a directory. The tool crashes since it finds foo/dir and tries to read that as a file and fails. Patch by: kousikk (Kousik Kumar) Differential Revision: https://reviews.llvm.org/D67091 llvm-svn: 371903
* Fix test to use %t for newly created files.Tim Shen2019-09-131-5/+5
| | | | | | | | This is both for consistency with other `mkdir`s in tests, and fixing permission issues with the non-temporary cwd during testing (they are not always writable). llvm-svn: 371897
* [OPENMP5.0]Add basic support for declare variant directive.Alexey Bataev2019-09-1313-91/+804
| | | | | | | Added basic support for declare variant directive and its match clause with user context selector. llvm-svn: 371892
* [Support] Add overload writeFileAtomically(std::function Writer)Jan Korous2019-09-132-47/+14
| | | | | | Differential Revision: https://reviews.llvm.org/D67424 llvm-svn: 371890
* Reland r371785: Add -Wpoison-system-directories warningManoj Gupta2019-09-138-0/+41
| | | | | | | | | | | | | | | | | | | | When using clang as a cross-compiler, we should not use system headers to do the compilation. This CL adds support of a new warning flag -Wpoison-system-directories which emits warnings if --sysroot is set and headers from common host system location are used. By default the warning is disabled. The intention of the warning is to catch bad includes which are usually generated by third party build system not targeting cross-compilation. Such cases happen in Chrome OS when someone imports a new package or upgrade one to a newer version from upstream. This is reland of r371785 with a fix to test file. Patch by: denik (Denis Nikitin) llvm-svn: 371878
* Fix build error in 371875Erich Keane2019-09-131-2/+2
| | | | | | | | | Apparently Clang complains about the name hiding here in a way that my GCC build does not, so a shocking number of buildbots decided to tell me about it. Change the name of the variable to prevent the name hiding and hope we don't have to fix this again. llvm-svn: 371876
* [NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr.Erich Keane2019-09-1330-1201/+1082
| | | | | | | | | | | | In order to enable future improvements to our attribute diagnostics, this moves info from ParsedAttr into CommonAttributeInfo, then makes this type the base of the *Attr and ParsedAttr types. Quite a bit of refactoring took place, including removing a bunch of redundant Spelling Index propogation. Differential Revision: https://reviews.llvm.org/D67368 llvm-svn: 371875
* [Sema][Typo Correction] Fix potential infite loop on ambiguity checksDavid Goldman2019-09-132-0/+33
| | | | | | | | | | | | | | | | | | | | | | Summary: This fixes a bug introduced in D62648, where Clang could infinite loop if it became stuck on a single TypoCorrection when it was supposed to be testing ambiguous corrections. Although not a common case, it could happen if there are multiple possible corrections with the same edit distance. The fix is simply to wipe the TypoExpr from the `TransformCache` so that the call to `TransformTypoExpr` doesn't use the `CachedEntry`. Reviewers: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67515 llvm-svn: 371859
* clang-format: Add support for formatting (some) lambdas with explicit ↵Nico Weber2019-09-133-5/+28
| | | | | | | | | | | | | | template parameters. This patch makes cases work where the lambda's template list doesn't contain any of + - ! ~ / % << | || && ^ == != >= <= ? : true false (see added FIXME). Ports r359967 to clang-format. Differential Revision: https://reviews.llvm.org/D67246 llvm-svn: 371854
* Fix depfile name constructionLuke Cheeseman2019-09-132-6/+16
| | | | | | | | | | | | | | - When using -o, the provided filename is using for constructing the depfile name (when -MMD is passed). - The logic looks for the rightmost '.' character and replaces what comes after with 'd'. - This works incorrectly when the filename has no extension and the directories have '.' in them (e.g. out.dir/test) - This replaces the funciton to just llvm::sys::path functionality Differential Revision: https://reviews.llvm.org/D67542 llvm-svn: 371853
* [ASTImporter] Add development internals docsGabor Marton2019-09-131-0/+489
| | | | | | | | | | | | Reviewers: a_sidorin, shafik, teemperor, gamesh411, balazske, dkrupp, a.sidorin Subscribers: rnkovacs, Szelethus, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66336 llvm-svn: 371839
* [Clang Interpreter] Initial patch for the constexpr interpreterNandor Licker2019-09-1362-265/+9035
| | | | | | | | | | | | | | | | | | Summary: This patch introduces the skeleton of the constexpr interpreter, capable of evaluating a simple constexpr functions consisting of if statements. The interpreter is described in more detail in the RFC. Further patches will add more features. Reviewers: Bigcheese, jfb, rsmith Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64146 llvm-svn: 371834
* Fix a perl warning: Scalar value @ArgParts[0] better written as $ArgParts[0] ↵Sylvestre Ledru2019-09-131-1/+1
| | | | | | at /usr/share/clang/scan-build-10/libexec/ccc-analyzer line 502. llvm-svn: 371832
* [Clang][ASTImporter] Added visibility check for FunctionTemplateDecl.Balazs Keri2019-09-132-11/+54
| | | | | | | | | | | | | | | | | | Summary: ASTImporter makes now difference between function templates with same name in different translation units if these are not visible outside. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67490 llvm-svn: 371820
OpenPOWER on IntegriCloud