[PATCH] [libcxx] Ensure std::getline always 0-terminates string.

2017-09-08 Thread Reimar Döffinger via cfe-commits
If the sentinel failed (e.g. due to having reached EOF before) or an exception was caught it failed to do that. While it seems (unfortunately!) not required by the specification, libstdc++ does 0-terminate and not doing so risks creating security issues in applications. --- include/istream | 6 +++

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 114309. arphaman marked 2 inline comments as done. arphaman added a comment. - rename namespace - try to further decouple SourceSelectionArgument Repository: rL LLVM https://reviews.llvm.org/D36574 Files: include/clang/Tooling/Refactoring/AtomicChange

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: tools/clang-refactor/ClangRefactor.cpp:62 + /// \returns true if an error occurred, false otherwise. + virtual bool refactorForEachSelection( + RefactoringRuleContext &Context, ioeric wrote: > I would expect the

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. I think this is ready to go. @klimek Manuel, are all your concerns addressed? Comment at: tools/clang-refactor/ClangRefactor.cpp:62 + /// \returns true if an error occurred

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Please wait for Manuel's reply before landing the patch ;-) Repository: rL LLVM https://reviews.llvm.org/D36574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D36150: [clangd] LSP extension to switch between source/header file

2017-09-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added a comment. This revision now requires changes to proceed. Just a few more comments. Should be easy to fix. Could you also please `clang-format` the code? Comment at: clangd/ClangdLSPServer.cpp:225 + llvm::Op

[PATCH] D37378: [clang] [python] Move test_exception_specification_kind to correct subdir

2017-09-08 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D37378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Could you also `clang-format` the code please? Comment at: clangd/ClangdServer.cpp:150 bool RunSynchronously, + llvm::Optional CompileCommandsDir, llvm::Optional Res

[PATCH] D37101: [clangd] Add support for snippet completions

2017-09-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. Thanks for the change! Looks good minus an outdated description of `enable-snippets` flag. Do you have commit access to llvm repository? Comment at: clangd/too

[PATCH] D37513: [clang-format] Fix documentation for AllowAllParametersOfDeclarationOnNextLine

2017-09-08 Thread Lucja Mazur via Phabricator via cfe-commits
LuMa closed this revision. LuMa added a comment. Thank you. https://reviews.llvm.org/D37513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r312780 - Fix templated type alias completion when using global completion cache

2017-09-08 Thread Erik Verbruggen via cfe-commits
Author: erikjv Date: Fri Sep 8 02:31:13 2017 New Revision: 312780 URL: http://llvm.org/viewvc/llvm-project?rev=312780&view=rev Log: Fix templated type alias completion when using global completion cache When we have enabled cache for global completions we did not have diagnostics for Bar and cou

[PATCH] D33719: Add _Float16 as a C/C++ source language type

2017-09-08 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Many thanks for reviewing and your help! https://reviews.llvm.org/D33719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37378: [clang] [python] Move test_exception_specification_kind to correct subdir

2017-09-08 Thread Andrew J. Bennieston via Phabricator via cfe-commits
ajbennieston accepted this revision. ajbennieston added a comment. This revision is now accepted and ready to land. Looks good to me. Repository: rL LLVM https://reviews.llvm.org/D37378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

r312781 - Add _Float16 as a C/C++ source language type

2017-09-08 Thread Sjoerd Meijer via cfe-commits
Author: sjoerdmeijer Date: Fri Sep 8 02:42:32 2017 New Revision: 312781 URL: http://llvm.org/viewvc/llvm-project?rev=312781&view=rev Log: Add _Float16 as a C/C++ source language type This adds _Float16 as a source language type, which is a 16-bit floating point type defined in C11 extension ISO/

[PATCH] D33719: Add _Float16 as a C/C++ source language type

2017-09-08 Thread Sjoerd Meijer via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312781: Add _Float16 as a C/C++ source language type (authored by SjoerdMeijer). Changed prior to commit: https://reviews.llvm.org/D33719?vs=113218&id=114325#toc Repository: rL LLVM https://reviews.

[PATCH] D37618: Use CommonOptionsParser in clang-refactor

2017-09-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch ensures that CommonOptionsParser works with subcommands. This allows clang-refactor to use the `CommonOptionsParser`. Depends on https://reviews.llvm.org/D36574. Repository: rL LLVM https://reviews.llvm.org/D37618 Files: lib/Tooling/CommonOption

[PATCH] D34878: [ARM] Option for reading thread pointer from coprocessor register

2017-09-08 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic marked 3 inline comments as done. spetrovic added inline comments. Comment at: include/clang/Driver/Options.td:1664-1665 HelpText<"Allow generation of data access to code sections (ARM only)">; +def mtp_mode_EQ : Joined<["-"], "mtp=">, Group, Values<"soft, cp15">, +

[PATCH] D34878: [ARM] Option for reading thread pointer from coprocessor register

2017-09-08 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic updated this revision to Diff 114329. spetrovic marked 3 inline comments as done. https://reviews.llvm.org/D34878 Files: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Driver/CC1Options.td include/clang/Driver/Options.td lib/Driver/ToolChains/Arch/ARM.cpp lib/Drive

[PATCH] D36390: Fix overloaded static functions in SemaCodeComplete

2017-09-08 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. one more ping :) https://reviews.llvm.org/D36390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37378: [clang] [python] Move test_exception_specification_kind to correct subdir

2017-09-08 Thread Michał Górny via Phabricator via cfe-commits
mgorny closed this revision. mgorny added a comment. It seems that somebody already moved the file in https://reviews.llvm.org/D37490. Repository: rL LLVM https://reviews.llvm.org/D37378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D37618: Use CommonOptionsParser in clang-refactor

2017-09-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lgtm Repository: rL LLVM https://reviews.llvm.org/D37618 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

r312784 - Revert "Add _Float16 as a C/C++ source language type"

2017-09-08 Thread Sjoerd Meijer via cfe-commits
Author: sjoerdmeijer Date: Fri Sep 8 03:20:52 2017 New Revision: 312784 URL: http://llvm.org/viewvc/llvm-project?rev=312784&view=rev Log: Revert "Add _Float16 as a C/C++ source language type" The clang-with-lto-ubuntu bot didn't like the new regression test, revert while I investigate the issue.

r312785 - Don't show deleted function (constructor) candidates for code completion

2017-09-08 Thread Erik Verbruggen via cfe-commits
Author: erikjv Date: Fri Sep 8 03:23:08 2017 New Revision: 312785 URL: http://llvm.org/viewvc/llvm-project?rev=312785&view=rev Log: Don't show deleted function (constructor) candidates for code completion In case of copy constructor is implicitly deleted it's still shown. PR34402 describes a way

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 6 inline comments as done. yaxunl added inline comments. Comment at: include/clang/AST/Type.h:332 + bool getImplicitAddressSpaceFlag() const { return Mask & IMask; } + void setImplicitAddressSpaceFlag(bool Value) { Anastasia wrote: > Could we ad

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 114337. yaxunl marked 3 inline comments as done. yaxunl edited the summary of this revision. yaxunl added a comment. Add comments for getImplicitAddressSpaceFlag and fix checking of null pointer. https://reviews.llvm.org/D35082 Files: include/clang/AST/AST

[PATCH] D37491: [Preamble] Fixed preamble breaking with BOM presence (and particularly, fluctuating BOM presence)

2017-09-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Parsing errors on preamble additions and removals are definitely bad and should be fixed. But I would argue that the right approach is to invalidate the preamble and rebuild it on BOM changes. Current fix in `ASTUnit` just hides an error in the underlying APIs. F

[PATCH] D37254: [Sema] Disallow assigning record lvalues with nested const-qualified fields.

2017-09-08 Thread Bevin Hansson via Phabricator via cfe-commits
bevinh updated this revision to Diff 114340. bevinh marked an inline comment as done. bevinh added a comment. Added a diag note for NestedConstMember. https://reviews.llvm.org/D37254 Files: include/clang/AST/Expr.h include/clang/AST/Type.h include/clang/Basic/DiagnosticSemaKinds.td lib/

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Sam McCall via cfe-commits
Nice fix! It catches a lot of new cases on our codebase, all technically correct so far. A couple of issues though: A) Rollout - until we've completely cleaned up, we need to disable -Wtautological-compare entirely, which is a valuable check. I imagine anyone else using -Werror is in the same boat

[libcxx] r312774 - XFAIL tests on SLES11

2017-09-08 Thread Brian Cain via cfe-commits
Author: bcain Date: Thu Sep 7 20:57:02 2017 New Revision: 312774 URL: http://llvm.org/viewvc/llvm-project?rev=312774&view=rev Log: XFAIL tests on SLES11 XFAIL some failing tests for SLES11 (older glibc), also replace spaces in linux distro w/dashes. Modified: libcxx/trunk/test/std/depr/dep

[PATCH] D31140: [LLVMbugs] [Bug 18710] Only generate .ARM.exidx and .ARM.extab when needed in EHABI

2017-09-08 Thread Christian Bruel via Phabricator via cfe-commits
chrib planned changes to this revision. chrib added a comment. Yes, I also tried to look into this direction, but I did not found a clean way from the driver to emit the attribute based on codegen options. Also unwind-tables must not be the default. (for C this is what I want to eliminate). In

[PATCH] D37474: [PCH] Allow VFS to be used for tests that generate PCH files

2017-09-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D37474#863335, @cameron314 wrote: > Looking at the way remapped buffers are handled, I just remembered that they > must exist on the file system (at the very least, in a directory that exists) > or the remapping is not taken into accoun

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Roman Lebedev via cfe-commits
On Fri, Sep 8, 2017 at 2:48 PM, Sam McCall wrote: Hi. > Nice fix! Thank you! > It catches a lot of new cases on our codebase, all technically > correct so far. > > A couple of issues though: > A) Rollout - until we've completely cleaned up, we need to disable > -Wtautological-compare entirely, w

[PATCH] D37620: [Sema] Put tautological comparison of unsigned and zero into it's own flag

2017-09-08 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added a project: clang. As requested by Sam McCall. $ /build/llvm-build-Clang-release/./bin/clang -c /build/clang/test/Sema/outof-range-constant-compare.c /build/clang/test/Sema/outof-range-constant-compare.c:40:11: warning: comparison of unsigned

[PATCH] D37491: [Preamble] Fixed preamble breaking with BOM presence (and particularly, fluctuating BOM presence)

2017-09-08 Thread Erik Verbruggen via Phabricator via cfe-commits
erikjv added a comment. Will this fix PR25023 and PR21144? https://reviews.llvm.org/D37491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37620: [Sema] Put tautological comparison of unsigned and zero into it's own flag

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > Does this need test? Yes, it does -- I'd add one with two RUN lines, one with the flag and one without it to make sure you only get the diagnostics in one case. Repository: rL LLVM https://reviews.llvm.org/D37620 __

[PATCH] D36672: [clang-tidy] readability-non-const-parameter: fixit on all function declarations

2017-09-08 Thread Anders Rönnholm via Phabricator via cfe-commits
AndersRonnholm updated this revision to Diff 114346. AndersRonnholm added a comment. Herald added subscribers: xazax.hun, JDevlieghere. Fixed comments Repository: rL LLVM https://reviews.llvm.org/D36672 Files: clang-tidy/readability/NonConstParameterCheck.cpp test/clang-tidy/readability-

[PATCH] D36672: [clang-tidy] readability-non-const-parameter: fixit on all function declarations

2017-09-08 Thread Anders Rönnholm via Phabricator via cfe-commits
AndersRonnholm marked 2 inline comments as done. AndersRonnholm added inline comments. Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:147 +if (const auto *Parent = Par->getParentFunctionOrMethod()) { + if (const auto *F = dyn_cast(Parent)) { +const

[PATCH] D37620: [Sema] Put tautological comparison of unsigned and zero into it's own flag

2017-09-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks! Unless I'm missing something, the current patch just adds the category, but doesn't actually recategorize the warning, right? Repository: rL LLVM https://reviews.llvm.org/D37620 ___ cfe-commits mailing list cfe

[PATCH] D37382: Fixed a crash in code completion.

2017-09-08 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D37382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D37620: [Sema] Put tautological comparison of unsigned and zero into it's own flag

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D37620#864684, @sammccall wrote: > Thanks! > Unless I'm missing something, the current patch just adds the category, but > doesn't actually recategorize the warning, right? The diagnostics in DiagnosticSemaKinds.td are changed to be i

[PATCH] D37620: [Sema] Put tautological comparison of unsigned and zero into it's own flag

2017-09-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Right, of course. Thanks and LG, but clearly also get a review from someone more familiar with the code (I'm just a buildcop) Repository: rL LLVM https://reviews.llvm.org/D37620

[PATCH] D37620: [Sema] Put tautological comparison of unsigned and zero into it's own flag

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. The bulk of the patch LGTM as well, but it should still have a test case. Repository: rL LLVM https://reviews.llvm.org/D37620

[PATCH] D31140: [LLVMbugs] [Bug 18710] Only generate .ARM.exidx and .ARM.extab when needed in EHABI

2017-09-08 Thread Christian Bruel via Phabricator via cfe-commits
chrib added a comment. forgot to give the motivating figure. this brings a code size reduction of 9.5 % (geomean of text sections sizes) on coremarkpro -Oz for cortex-m3 eabi https://reviews.llvm.org/D31140 ___ cfe-commits mailing list cfe-commits

[PATCH] D37382: Fixed a crash in code completion.

2017-09-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 114349. ilya-biryukov added a comment. - Fix to account for change in the interface of ParseExpressionList. https://reviews.llvm.org/D37382 Files: lib/Parse/ParseDecl.cpp test/CodeCompletion/crash-func-init.cpp Index: test/CodeCompletion/crash-f

r312788 - Fixed a crash in code completion.

2017-09-08 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Sep 8 06:36:38 2017 New Revision: 312788 URL: http://llvm.org/viewvc/llvm-project?rev=312788&view=rev Log: Fixed a crash in code completion. Summary: The crash occured when FunctionDecl was parsed with an initializer. Reviewers: bkramer, klimek, francisco.lopes Revi

[PATCH] D37382: Fixed a crash in code completion.

2017-09-08 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312788: Fixed a crash in code completion. (authored by ibiryukov). Repository: rL LLVM https://reviews.llvm.org/D37382 Files: cfe/trunk/lib/Parse/ParseDecl.cpp cfe/trunk/test/CodeCompletion/crash-

[PATCH] D37101: [clangd] Add support for snippet completions

2017-09-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. Great! https://reviews.llvm.org/D37101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/AttrDocs.td:3154 + +def SelectAnyDocs : Documentation { + let Content = [{This attribute makes global symbol have a weak definition Prazek wrote: > aaron.ballman wrote: > > Prazek wrote: > > >

[PATCH] D37620: [Sema] Put tautological comparison of unsigned and zero into it's own flag

2017-09-08 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 114351. lebedev.ri edited the summary of this revision. lebedev.ri added a comment. Added test. Repository: rL LLVM https://reviews.llvm.org/D37620 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td test/Se

r312790 - Updated two annotations for Store.h and CodeGenFunction.h.

2017-09-08 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Fri Sep 8 06:44:51 2017 New Revision: 312790 URL: http://llvm.org/viewvc/llvm-project?rev=312790&view=rev Log: Updated two annotations for Store.h and CodeGenFunction.h. Summary: 1.Updated annotations for include/clang/StaticAnalyzer/Core/PathSensitive/Store.h, which belo

[PATCH] D37620: [Sema] Put tautological comparison of unsigned and zero into it's own flag

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Please run the test through clang-format, but otherwise LGTM! Repository: rL LLVM https://reviews.llvm.org/D37620 ___ cfe-commit

[PATCH] D37620: [Sema] Put tautological comparison of unsigned and zero into it's own flag

2017-09-08 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312792: [Sema] Put tautological comparison of unsigned and zero into it's own flag (authored by lebedevri). Changed prior to commit: https://reviews.llvm.org/D37620?vs=114351&id=114358#toc Repository:

[PATCH] D36354: [clang-tidy] Implement type-based check for `gsl::owner`

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp:140 + + assert(CheckExecuted == true && + "Non of the subroutines did execute, logic error in matcher!"); Can assert `CheckExecuted` and drop the explicit

r312792 - [Sema] Put tautological comparison of unsigned and zero into it's own flag

2017-09-08 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Fri Sep 8 06:56:45 2017 New Revision: 312792 URL: http://llvm.org/viewvc/llvm-project?rev=312792&view=rev Log: [Sema] Put tautological comparison of unsigned and zero into it's own flag Summary: As requested by Sam McCall. ``` $ /build/llvm-build-Clang-release/./bin/clan

[PATCH] D37263: [clang-format] Ignore case when sorting using-declarations

2017-09-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. ping https://reviews.llvm.org/D37263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37140: [clang-format] Fixed one-line if statement

2017-09-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Great! Would you like me to commit this for you? https://reviews.llvm.org/D37140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D37413: [X86][MS-InlineAsm] Extended support for variables / identifiers on memory / immediate expressions

2017-09-08 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a reviewer: RKSimon. RKSimon added a comment. Tests? Comment at: lib/Sema/SemaStmtAsm.cpp:71 +if (!Piece.isOperand()) + continue; This all looks like a clang-format NFC change - just commit it? Comment at: lib/Sema/Se

[PATCH] D37308: Interface class with uuid base record

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:2385 + return RD->isStruct() && RD->hasAttr() && + RD->getName() == "IUnknown" && + (RD->getAttr())->getGuid() == This should probably also ensure that the class is in the

[PATCH] D37624: add support for -fno-instrument-functions and -finstrument-functions-exclude-{file, function}-list= to match gcc options.

2017-09-08 Thread kchoi via Phabricator via cfe-commits
choikwa created this revision. Builds on previous Differential https://reviews.llvm.org/D2219 Changes include: - Using unordered_map with SourceLocation.ID (raw encoding) as key - Demangle only if !isExternC. Used dyn_cast((Decl*)CurFuncDecl) for this - Modified an existing C testcase to test f

[PATCH] D36672: [clang-tidy] readability-non-const-parameter: fixit on all function declarations

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:147 +if (const auto *Parent = Par->getParentFunctionOrMethod()) { + if (const auto *F = dyn_cast(Parent)) { +const auto ParDecl = AndersRonnholm wr

[PATCH] D37566: [clang-tidy] fixed misc-unused-parameters omitting parameters default value

2017-09-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Thank you for the fix! LG with one nit. Comment at: test/clang-tidy/misc-unused-parameters.cpp:73 +// CHECK-FIXES: staticFunctionE(); + staticFunctionF(1); +// CHECK-FIXES:

[PATCH] D37491: [Preamble] Fixed preamble breaking with BOM presence (and particularly, fluctuating BOM presence)

2017-09-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D37491#864649, @erikjv wrote: > Will this fix PR25023 and PR21144? PR25023 should be fixed by this change. It is essentially a repro of the same bug. Could we add a `c-index-test`-based tes

[PATCH] D37140: [clang-format] Fixed one-line if statement

2017-09-08 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. Yes, would be great :) Thank you! https://reviews.llvm.org/D37140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37572: [clang-tidy] SuspiciousEnumUsageCheck bugfix

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/SuspiciousEnumUsageCheck.cpp:46 + return llvm::APSInt::compareValues(E1->getInitVal(), + E2->getInitVal()) == -1; }); I would test for `

[PATCH] D37568: [AMDGPU] Allow flexible register names in inline asm constraints

2017-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 114367. yaxunl edited the summary of this revision. yaxunl added a comment. Allow {v[n]} and {s[n]}. Add more tests. https://reviews.llvm.org/D37568 Files: lib/Basic/Targets/AMDGPU.h test/CodeGenOpenCL/amdgcn-inline-asm.cl test/Sema/inline-asm-validate

r312794 - Recommit "Add _Float16 as a C/C++ source language type"

2017-09-08 Thread Sjoerd Meijer via cfe-commits
Author: sjoerdmeijer Date: Fri Sep 8 08:15:00 2017 New Revision: 312794 URL: http://llvm.org/viewvc/llvm-project?rev=312794&view=rev Log: Recommit "Add _Float16 as a C/C++ source language type" This is a recommit of r312781; in some build configurations variable names are omitted, so changed the

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-09-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:6994 + // OpenCL v1.2 s6.5: + // The generic address space name for arguments to a function in a + // program, or local variables of a function is __private. All function yaxunl wro

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: lib/Sema/SemaType.cpp:6994 + // OpenCL v1.2 s6.5: + // The generic address space name for arguments to a function in a + // program, or local variables of a function is __private. Al

Re: Patch bug 27628

2017-09-08 Thread Krzysztof Parzyszek via cfe-commits
This should to to cfe-commits. Redirecting. -Krzysztof On 9/8/2017 10:25 AM, Antoni Boucher via llvm-commits wrote: Hello. I've fixed the bug 27628: https://bugs.llvm.org/show_bug.cgi?id=27628 I attached the patch. Thanks. ___ llvm-commits mailin

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl abandoned this revision. yaxunl added a comment. We implemented this optimization through some target specific llvm pass. https://reviews.llvm.org/D36327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

Re: Patch bug 27628

2017-09-08 Thread Krzysztof Parzyszek via cfe-commits
Aaand the patch itself... -K On 9/8/2017 10:32 AM, Krzysztof Parzyszek via cfe-commits wrote: This should to to cfe-commits. Redirecting. -Krzysztof On 9/8/2017 10:25 AM, Antoni Boucher via llvm-commits wrote: Hello. I've fixed the bug 27628: https://bugs.llvm.org/show_bug.cgi?id=27628 I a

[PATCH] D37572: [clang-tidy] SuspiciousEnumUsageCheck bugfix

2017-09-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG modulo comments. Thank you for the fix! Comment at: test/clang-tidy/misc-suspicious-enum-usage.cpp:1 -// RUN: %check_clang_tidy %s misc-suspicious-enum-usage %t -- -confi

[PATCH] D37624: add support for -fno-instrument-functions and -finstrument-functions-exclude-{file, function}-list= to match gcc options.

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/CodeGen/CodeGenFunction.cpp:425 /// instrumented with __cyg_profile_func_* calls -bool CodeGenFunction::ShouldInstrumentFunction() { +bool CodeGenFunction::ShouldInstrumentFunction(llvm::Function *Fn) { + typedef std::vector:

[PATCH] D37572: [clang-tidy] SuspiciousEnumUsageCheck bugfix

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/misc-suspicious-enum-usage.cpp:122 +struct a> { + enum { ah = ad::m, + ai = ae::m, alexfh wrote: > aaron.ballman wrote: > > This seems like a lot of complicated code for the test case -- ca

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-08 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 114371. Nebiroth marked 10 inline comments as done. Nebiroth added a comment. Ran clang-format on modified files. More minor refactoring. https://reviews.llvm.org/D37150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.c

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-09-08 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: include/clang/Basic/AttrDocs.td:3154 + +def SelectAnyDocs : Documentation { + let Content = [{This attribute makes global symbol have a weak definition aaron.ballman wrote: > Prazek wrote: > > aaron.ballman wrote: > >

[PATCH] D37629: [Sema] Move some stuff into -Wtautological-unsigned-enum-zero-compare

2017-09-08 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added a project: clang. As requested by Sam McCall: > Enums (not new I guess). Typical case: if (enum < 0 || enum > MAX) > The warning strongly suggests that the enum < 0 check has no effect > (for enums with nonnegative ranges). > Clang doesn't see

Re: r312750 - [Sema] -Wtautological-compare: handle comparison of unsigned with 0S.

2017-09-08 Thread Roman Lebedev via cfe-commits
On Fri, Sep 8, 2017 at 3:26 PM, Roman Lebedev wrote: > On Fri, Sep 8, 2017 at 2:48 PM, Sam McCall wrote: > Hi. > >> Nice fix! > Thank you! > >> It catches a lot of new cases on our codebase, all technically >> correct so far. >> >> A couple of issues though: >> A) Rollout - until we've completely

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-08 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. https://reviews.llvm.org/D37299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-09-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/AttrDocs.td:3154 + +def SelectAnyDocs : Documentation { + let Content = [{This attribute makes global symbol have a weak definition majnemer wrote: > aaron.ballman wrote: > > Prazek wrote: > >

r312795 - Add '\n' in ClangDataCollectorsEmitter

2017-09-08 Thread Konstantin Zhuravlyov via cfe-commits
Author: kzhuravl Date: Fri Sep 8 09:17:16 2017 New Revision: 312795 URL: http://llvm.org/viewvc/llvm-project?rev=312795&view=rev Log: Add '\n' in ClangDataCollectorsEmitter Differential Revision: https://reviews.llvm.org/D37599 Modified: cfe/trunk/utils/TableGen/ClangDataCollectorsEmitter.c

[PATCH] D37599: Add '\n' in ClangDataCollectorsEmitter

2017-09-08 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312795: Add '\n' in ClangDataCollectorsEmitter (authored by kzhuravl). Changed prior to commit: https://reviews.llvm.org/D37599?vs=114269&id=114376#toc Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D37624: add support for -fno-instrument-functions and -finstrument-functions-exclude-{file, function}-list= to match gcc options.

2017-09-08 Thread kchoi via Phabricator via cfe-commits
choikwa updated this revision to Diff 114380. choikwa added a comment. addressed code review. made doc consistent with functionality. https://reviews.llvm.org/D37624 Files: docs/ClangCommandLineReference.rst include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.h lib/Cod

[PATCH] D37624: add support for -fno-instrument-functions and -finstrument-functions-exclude-{file, function}-list= to match gcc options.

2017-09-08 Thread kchoi via Phabricator via cfe-commits
choikwa added a comment. Forgot to hang Cache to CodeGenModule, will do that shortly https://reviews.llvm.org/D37624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r312798 - Add _Float16 as a C/C++ source language type

2017-09-08 Thread Sjoerd Meijer via cfe-commits
Author: sjoerdmeijer Date: Fri Sep 8 09:43:10 2017 New Revision: 312798 URL: http://llvm.org/viewvc/llvm-project?rev=312798&view=rev Log: Add _Float16 as a C/C++ source language type Pacify the windows builder; fixed the new test as on Windows some additional attributes are printed. Modified:

[PATCH] D37599: Add '\n' in ClangDataCollectorsEmitter

2017-09-08 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl added a comment. In https://reviews.llvm.org/D37599#864376, @arphaman wrote: > LGTM. Do you have commit access? Yep, committed. Thanks. Repository: rL LLVM https://reviews.llvm.org/D37599 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-09-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:6994 + // OpenCL v1.2 s6.5: + // The generic address space name for arguments to a function in a + // program, or local variables of a function is __private. All function yaxunl wro

[PATCH] D33514: [WIP] Bug 32352 - Provide a way for OptimizationRemarkEmitter::allowExtraAnalysis to check if (specific) remarks are enabled

2017-09-08 Thread Adam Nemet via Phabricator via cfe-commits
anemet added a comment. Only minor things at this point. This is very close now. Comment at: include/llvm/Analysis/OptimizationDiagnosticInfo.h:81 /// detected by the user. - bool allowExtraAnalysis() const { -// For now, only allow this with -fsave-optimization-record

r312801 - Use EmitPointerWithAlignment to get alignment information of the pointer used in atomic expr.

2017-09-08 Thread Wei Mi via cfe-commits
Author: wmi Date: Fri Sep 8 10:07:32 2017 New Revision: 312801 URL: http://llvm.org/viewvc/llvm-project?rev=312801&view=rev Log: Use EmitPointerWithAlignment to get alignment information of the pointer used in atomic expr. This is to fix PR34347. EmitAtomicExpr now only uses alignment informati

[PATCH] D37310: [Atomic] Merge alignment information from Decl and from Type when emit atomic expression.

2017-09-08 Thread Wei Mi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312801: Use EmitPointerWithAlignment to get alignment information of the pointer used… (authored by wmi). Changed prior to commit: https://reviews.llvm.org/D37310?vs=114300&id=114384#toc Repository:

[PATCH] D37604: Disable debuginfo-tests for non-native configurations

2017-09-08 Thread Paul Robinson via Phabricator via cfe-commits
probinson closed this revision. probinson added a comment. r312803. Forgot to put the tag in the commit message https://reviews.llvm.org/D37604 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D37629: [Sema] Move some stuff into -Wtautological-unsigned-enum-zero-compare

2017-09-08 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 114387. lebedev.ri added a subscriber: jroelofs. lebedev.ri added a comment. Rework as per @jroelofs's suggestion to have just one `switch`/`if` cascade that operates on `BinaryOperatorKind` Repository: rL LLVM https://reviews.llvm.org/D37629 Files:

[PATCH] D37196: [Clang] Bug 32352 - Provide a way for OptimizationRemarkEmitter::allowExtraAnalysis to check if (specific) remarks are enabled

2017-09-08 Thread Adam Nemet via Phabricator via cfe-commits
anemet added a comment. Please clean this up as well (don't have commented-out lines) so that it's ready to go with the LLVM patch. Comment at: lib/CodeGen/CodeGenAction.cpp:302-305 static void DiagnosticHandler(const llvm::DiagnosticInfo &DI,

[PATCH] D37624: add support for -fno-instrument-functions and -finstrument-functions-exclude-{file, function}-list= to match gcc options.

2017-09-08 Thread kchoi via Phabricator via cfe-commits
choikwa updated this revision to Diff 114388. choikwa added a comment. renamed and moved Cache to SourceLocToFileNameMap in CodeGenModule https://reviews.llvm.org/D37624 Files: docs/ClangCommandLineReference.rst include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.h lib

[PATCH] D37474: [PCH] Allow VFS to be used for tests that generate PCH files

2017-09-08 Thread Cameron via Phabricator via cfe-commits
cameron314 added inline comments. Comment at: lib/Frontend/ASTUnit.cpp:1014 +/// with another virtual file system. +class PCHOverlayFileSystem : public vfs::FileSystem +{ ilya-biryukov wrote: > Maybe create a combination of `InMemoryFileSystem` and `OverlayFileSy

[PATCH] D37572: [clang-tidy] SuspiciousEnumUsageCheck bugfix

2017-09-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/misc-suspicious-enum-usage.cpp:122 +struct a> { + enum { ah = ad::m, + ai = ae::m, aaron.ballman wrote: > alexfh wrote: > > aaron.ballman wrote: > > > This seems like a lot of complicated code for

[PATCH] D37629: [Sema] Move some stuff into -Wtautological-unsigned-enum-zero-compare

2017-09-08 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. I'm not sure it's better than writing the if/elseif/elseif/elseif out explicitly :/ Repository: rL LLVM https://reviews.llvm.org/D37629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D37572: [clang-tidy] SuspiciousEnumUsageCheck bugfix

2017-09-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/misc-suspicious-enum-usage.cpp:122 +struct a> { + enum { ah = ad::m, + ai = ae::m, alexfh wrote: > aaron.ballman wrote: > > alexfh wrote: > > > aaron.ballman wrote: > > > > This seems like a lot o

[PATCH] D37604: Disable debuginfo-tests for non-native configurations

2017-09-08 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In https://reviews.llvm.org/D37604#864187, @aprantl wrote: > This seems reasonable to me, thanks! > When you commit this, could you please double-check that the tests are still > running on the green dragon builders? I'll also keep an eye on them. I was able to goog

[PATCH] D37629: [Sema] Move some stuff into -Wtautological-unsigned-enum-zero-compare

2017-09-08 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 114396. lebedev.ri added a comment. And finish reducing the code by for-range-loop`ing over array + use `std::array`. Repository: rL LLVM https://reviews.llvm.org/D37629 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/Diagnosti

  1   2   >