Re: r320942 - [ASTImporter] Support importing FunctionTemplateDecl and CXXDependentScopeMemberExpr

2017-12-20 Thread Aleksei Sidorin via cfe-commits
Thank you, Peter! I'll take a look. Unfortunately, there were no any buildbot e-mail complains about it so I didn't even notice the issue. 20.12.2017 04:48, Peter Collingbourne пишет: Hi, I reverted this change in r321139 because it causes a test failure on Windows. e.g. https://logs.chromi

[clang-tools-extra] r321156 - [clangd] Add "../" to Logger.h included from parent directory.

2017-12-20 Thread Martin Bohme via cfe-commits
Author: mboehme Date: Wed Dec 20 01:17:31 2017 New Revision: 321156 URL: http://llvm.org/viewvc/llvm-project?rev=321156&view=rev Log: [clangd] Add "../" to Logger.h included from parent directory. Modified: clang-tools-extra/trunk/clangd/index/MemIndex.cpp Modified: clang-tools-extra/trunk/c

[clang-tools-extra] r321157 - [clangd] Igore cases in index fuzzy find.

2017-12-20 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Dec 20 01:29:54 2017 New Revision: 321157 URL: http://llvm.org/viewvc/llvm-project?rev=321157&view=rev Log: [clangd] Igore cases in index fuzzy find. Modified: clang-tools-extra/trunk/clangd/index/MemIndex.cpp clang-tools-extra/trunk/unittests/clangd/IndexTests.cp

[PATCH] D41432: [clangd] Switch xrefs and documenthighlight to annotated-code unit tests. NFC

2017-12-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, ilya-biryukov, mgorny, klimek. The goal here is again to make it easier to read and write the tests. I've extracted `parseTextMarker` from CodeCompleteTests into an `Annotations` class, add

[clang-tools-extra] r321161 - [clangd] Add debug printers for basic protocol types. NFC

2017-12-20 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Dec 20 02:26:53 2017 New Revision: 321161 URL: http://llvm.org/viewvc/llvm-project?rev=321161&view=rev Log: [clangd] Add debug printers for basic protocol types. NFC Modified: clang-tools-extra/trunk/clangd/Protocol.cpp clang-tools-extra/trunk/clangd/Protocol.h

[PATCH] D41432: [clangd] Switch xrefs and documenthighlight to annotated-code unit tests. NFC

2017-12-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 127674. sammccall added a comment. Remove test PrintTos for basic types after r321161. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41432 Files: test/clangd/definitions.test test/clangd/documenthighlight.test test/clangd/xrefs.tes

[PATCH] D41433: Unit tests for TBAA metadata generation.

2017-12-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, hfinkel. Herald added subscribers: kosarev, mgorny. Now tests for metadata created by clang involve compiling code snippets placed into c/c++ source files and matching interesting patterns in the obtained textual representation

[PATCH] D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid

2017-12-20 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg updated this revision to Diff 127676. sberg added a comment. added a small IR test https://reviews.llvm.org/D40295 Files: clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprCXX.cpp clang/lib/CodeGen/CodeGenFunction.h clang/test/CodeGenCXX/ubsan-vtable-checks.cpp compiler-rt/li

[PATCH] D41237: [Frontend] Handle skipped bodies in template instantiations

2017-12-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rC Clang https://reviews.llvm.org/D41237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D41432: [clangd] Switch xrefs and documenthighlight to annotated-code unit tests. NFC

2017-12-20 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! This is amazing! Comment at: unittests/clangd/Annotations.h:12 +// +//Annotations Example(R"cpp( +// int complete() { x.pri^ } // ^ indicates a point

[PATCH] D41409: [analyzer] Fix intermediate diagnostics on paths that go through operator new().

2017-12-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. Looks good! Repository: rC Clang https://reviews.llvm.org/D41409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

r321167 - Remove llvm::MemoryBuffer const_casts

2017-12-20 Thread Pavel Labath via cfe-commits
Author: labath Date: Wed Dec 20 03:34:38 2017 New Revision: 321167 URL: http://llvm.org/viewvc/llvm-project?rev=321167&view=rev Log: Remove llvm::MemoryBuffer const_casts Summary: llvm has grown a WritableMemoryBuffer class, which is convertible (inherits from) a MemoryBuffer. We can use it to av

[PATCH] D41387: Remove llvm::MemoryBuffer const_casts

2017-12-20 Thread Pavel Labath via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321167: Remove llvm::MemoryBuffer const_casts (authored by labath, committed by ). Repository: rL LLVM https://reviews.llvm.org/D41387 Files: cfe/trunk/lib/Basic/SourceManager.cpp cfe/trunk/lib/Le

[PATCH] D41408: [analyzer] NFC: Fix nothrow operator new definition in a test.

2017-12-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. Looks good, just a minor nit. Comment at: test/Analysis/NewDelete-custom.cpp:7 -#if !LEAKS +#if !(LEAKS && !ALLOCATOR_INLINING) // expected-no-diagnostics --

[PATCH] D39239: [AST] Incorrectly qualified unscoped enumeration as template actual parameter.

2017-12-20 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D39239#912837, @probinson wrote: > Have you tried the GDB suite yet? If it has no problems, and we can make > LLDB happy, I'm okay with it. Hi Paul, Following the instructions from David Blaikie on how to build/run the GDB suit

[clang-tools-extra] r321168 - [clang-tidy] Misc redundant expression checker updated for ineffective bitwise operator expressions

2017-12-20 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Wed Dec 20 04:22:16 2017 New Revision: 321168 URL: http://llvm.org/viewvc/llvm-project?rev=321168&view=rev Log: [clang-tidy] Misc redundant expression checker updated for ineffective bitwise operator expressions Examples: * Always evaluates to 0: ``` int X; if (0 & X) re

[clang-tools-extra] r321169 - Fix an error in the release notes.

2017-12-20 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Wed Dec 20 04:30:27 2017 New Revision: 321169 URL: http://llvm.org/viewvc/llvm-project?rev=321169&view=rev Log: Fix an error in the release notes. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst URL: http://

[PATCH] D35181: Defer addition of keywords to identifier table when loading AST

2017-12-20 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn updated this revision to Diff 127685. jklaehn added a project: clang. jklaehn added a comment. ping (rebased) https://reviews.llvm.org/D35181 Files: include/clang/Basic/IdentifierTable.h lib/Basic/IdentifierTable.cpp lib/Lex/Preprocessor.cpp unittests/libclang/LibclangTest.cpp

[PATCH] D39239: [AST] Incorrectly qualified unscoped enumeration as template actual parameter.

2017-12-20 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D39239#912837, @probinson wrote: > Have you tried the GDB suite yet? If it has no problems, and we can make > LLDB happy, I'm okay with it. These are the results when using GCC as the default compiler: === gdb S

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2017-12-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added reviewers: NoQ, george.karpenkov. xazax.hun added a comment. In the tests there are multiple variants of the strcpy function guarded by macros. Maybe we should run the tests multiple times to test all variants with different defines? https://reviews.llvm.org/D41384 _

Re: [clang-tools-extra] r320591 - [clangd] Fix bool conversion operator of UniqueFunction

2017-12-20 Thread Ilya Biryukov via cfe-commits
Thanks. Fixed in r321173. Should've been explicit from the start. On Mon, Dec 18, 2017 at 7:25 PM, David Blaikie wrote: > This operator bool should probably be explicit (as most/all of them should > be - and most of them in LLVM are) - to avoid undue implicit conversion to > other int types. > >

[clang-tools-extra] r321173 - [clangd] Made UniqueFunction's bool conversion explicit

2017-12-20 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Dec 20 06:06:05 2017 New Revision: 321173 URL: http://llvm.org/viewvc/llvm-project?rev=321173&view=rev Log: [clangd] Made UniqueFunction's bool conversion explicit Modified: clang-tools-extra/trunk/clangd/Function.h Modified: clang-tools-extra/trunk/clangd/Functio

[PATCH] D40705: [Parser] Diagnose storage classes in template parameter declarations

2017-12-20 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added a comment. I would appreciate, if you make those changes (because I'm very new to Clang and I'm not sure that I understand how to move these checks to Sema correctly). https://reviews.llvm.org/D40705 ___ cfe-commits mailing list cfe-co

[PATCH] D41406: [analyzer] Add a new checker callback, check::NewAllocator.

2017-12-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Maybe `debug.AnalysisOrder` could be used to test the callback order explicitly. This way the test could also serve as a documentation for the callback order. https://reviews.llvm.org/D41406 ___ cfe-commits mailing list

[PATCH] D41444: [ASTImporterTest] Make testing under '-fdelayed-template-parsing' mandatory

2017-12-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin created this revision. a.sidorin added reviewers: NoQ, xazax.hun, szepet. Herald added subscribers: cfe-commits, rnkovacs. While running ASTImporterTests, we often forget about Windows MSVC buildbots which enable '-fdelayed-template-parsing' by default. It takes reviewing time to find

[PATCH] D41444: [ASTImporterTest] Make testing under '-fdelayed-template-parsing' mandatory

2017-12-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Is it possible that this will hide other problems? Wouldn't it be better to run the tests twice once with this argument and once without it? Repository: rC Clang https://reviews.llvm.org/D41444 ___ cfe-commits mailing

r321174 - [Frontend] Handle skipped bodies in template instantiations

2017-12-20 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Dec 20 06:32:38 2017 New Revision: 321174 URL: http://llvm.org/viewvc/llvm-project?rev=321174&view=rev Log: [Frontend] Handle skipped bodies in template instantiations Summary: - Fixed an assert in Sema::InstantiateFunctionDefinition and added support for instantiati

[PATCH] D41237: [Frontend] Handle skipped bodies in template instantiations

2017-12-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321174: [Frontend] Handle skipped bodies in template instantiations (authored by ibiryukov, committed by ). Repository: rL LLVM https://reviews.llvm.org/D41237 Files: cfe/trunk/lib/Sema/SemaDecl.cpp

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-20 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. LGTM modulo the comment. Should I land this for you? Comment at: include/clang/Frontend/PrecompiledPreamble.h:247 + /// Can be used to store refere

[PATCH] D41444: [ASTImporterTest] Make testing under '-fdelayed-template-parsing' mandatory

2017-12-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. In https://reviews.llvm.org/D41444#960841, @xazax.hun wrote: > Is it possible that this will hide other problems? Wouldn't it be better to > run the tests twice once with this argument and once without it? I don't think so. In fact, without instantiation, we are not

[PATCH] D41448: Fix counting parameters/arguments for ObjC.

2017-12-20 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak created this revision. jolesiak added a reviewer: krasimir. Herald added a subscriber: klimek. [clang-format] Fix ParameterCount for ObjC. Repository: rC Clang https://reviews.llvm.org/D41448 Files: lib/Format/TokenAnnotator.cpp Index: lib/Format/TokenAnnotator.cpp =

[PATCH] D41444: [ASTImporterTest] Make testing under '-fdelayed-template-parsing' mandatory

2017-12-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D41444#960848, @a.sidorin wrote: > In https://reviews.llvm.org/D41444#960841, @xazax.hun wrote: > > > Is it possible that this will hide other problems? Wouldn't it be better to > > run the tests twice once with this argument and once withou

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-20 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 127715. Nebiroth added a comment. Updated BeforeExecute comment Repository: rC Clang https://reviews.llvm.org/D41365 Files: include/clang/Frontend/PrecompiledPreamble.h lib/Frontend/PrecompiledPreamble.cpp Index: lib/Frontend/PrecompiledPreamble.c

Re: [PATCH] D41444: [ASTImporterTest] Make testing under '-fdelayed-template-parsing' mandatory

2017-12-20 Thread Zachary Turner via cfe-commits
On the other hand, it doesn’t hurt anything to run the tests twice does it? I’d feel better if this patch were *adding* test coverage as opposed to changing coverage On Wed, Dec 20, 2017 at 6:50 AM Gábor Horváth via Phabricator < revi...@reviews.llvm.org> wrote: > xazax.hun added a comment. > > In

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-20 Thread William Enright via Phabricator via cfe-commits
Nebiroth added a comment. Yes please land this. Repository: rC Clang https://reviews.llvm.org/D41365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40299: [Complex] Don't use __div?c3 when building with fast-math.

2017-12-20 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. I'll commit this for you Paul https://reviews.llvm.org/D40299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41450: [clangd] Pull CodeCompletionString handling logic into its own file and add unit test.

2017-12-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, ilya-biryukov, mgorny, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41450 Files: clangd/CMakeLists.txt clangd/CodeComplete.cpp clangd/CompletionString.cpp cl

r321183 - [Complex] Don't use __div?c3 when building with fast-math.

2017-12-20 Thread Florian Hahn via cfe-commits
Author: fhahn Date: Wed Dec 20 07:50:52 2017 New Revision: 321183 URL: http://llvm.org/viewvc/llvm-project?rev=321183&view=rev Log: [Complex] Don't use __div?c3 when building with fast-math. Summary: Plant an inline version of "((ac+bd)/(cc+dd)) + i((bc-ad)/(cc+dd))" instead. Patch by Paul Walk

[PATCH] D40299: [Complex] Don't use __div?c3 when building with fast-math.

2017-12-20 Thread Florian Hahn via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321183: [Complex] Don't use __div?c3 when building with fast-math. (authored by fhahn, committed by ). Repository: rC Clang https://reviews.llvm.org/D40299 Files: lib/CodeGen/CGExprComplex.cpp tes

[PATCH] D41394: [CodeGen] Support generation of TBAA info in the new format

2017-12-20 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 127722. kosarev added a comment. Added tests. https://reviews.llvm.org/D41394 Files: lib/CodeGen/CodeGenTBAA.cpp test/CodeGen/tbaa.cpp Index: test/CodeGen/tbaa.cpp === --- test/CodeGen/tba

[PATCH] D41451: Make DiagnosticIDs::getAllDiagnostics use std::vector

2017-12-20 Thread András Leitereg via Phabricator via cfe-commits
leanil created this revision. leanil added reviewers: rsmith, xazax.hun. Herald added a subscriber: rnkovacs. The size of the result vector is currently around 4600 with Flavor::WarningOrError, which makes std::vector a better candidate than llvm::SmallVector. https://reviews.llvm.org/D41451

[PATCH] D41451: Make DiagnosticIDs::getAllDiagnostics use std::vector

2017-12-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D41451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D41432: [clangd] Switch xrefs and documenthighlight to annotated-code unit tests. NFC

2017-12-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added inline comments. Comment at: unittests/clangd/Annotations.h:12 +// +//Annotations Example(R"cpp( +// int complete() { x.pri^ } // ^ indicates a point ioeric wrote: > Does this support

[PATCH] D41452: [CodeGen] Fix access sizes in new-format TBAA tags

2017-12-20 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added reviewers: rjmccall, hfinkel. kosarev added a project: clang. The new format requires to specify both the type of the access and its size. This patch fixes setting access sizes for TBAA tags that denote accesses to structure members. This fix affects

[clang-tools-extra] r321184 - [clangd] Switch xrefs and documenthighlight to annotated-code unit tests. NFC

2017-12-20 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Dec 20 08:06:05 2017 New Revision: 321184 URL: http://llvm.org/viewvc/llvm-project?rev=321184&view=rev Log: [clangd] Switch xrefs and documenthighlight to annotated-code unit tests. NFC Summary: The goal here is again to make it easier to read and write the tests. I'v

[PATCH] D41432: [clangd] Switch xrefs and documenthighlight to annotated-code unit tests. NFC

2017-12-20 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked 2 inline comments as done. Closed by commit rL321184: [clangd] Switch xrefs and documenthighlight to annotated-code unit tests. NFC (authored by sammccall, committed by ). Changed prior to commit: https:/

[PATCH] D41399: [CodeGen] Represent array members in new-format TBAA type descriptors

2017-12-20 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added inline comments. Comment at: test/CodeGen/tbaa-array.cpp:24 +// CHECK-DAG: [[TAG_A_i]] = !{[[TYPE_A:!.*]], [[TYPE_int:!.*]], i64 0, i64 4} +// CHECK-DAG: [[TAG_C_i]] = !{[[TYPE_C:!.*]], [[TYPE_int:!.*]], i64 0, i64 16} +// CHECK-DAG: [[TYPE_A]] = !{[[TYPE_char:!.*]]

[PATCH] D41345: [clangd] Add more symbol information for code completion.

2017-12-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 127730. ioeric marked 4 inline comments as done. ioeric added a comment. - Merge with origin/master - Fixed an error in merge - Make documentation etc optional in symbols - Merge remote-tracking branch 'origin/master' into symbol - Merge branch 'index-completio

[PATCH] D41444: [ASTImporterTest] Make testing under '-fdelayed-template-parsing' mandatory

2017-12-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. In case of `-fdelayed-template-parsing`, this code won't be even visible to the Importer. In my opinion, we shouldn't care about code we're not going to import. If we want to import it, we should make it visible and instantiate it. In this case it will not compile. Ho

[PATCH] D41345: [clangd] Add more symbol information for code completion.

2017-12-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the review! Logic around CodeCompletionString is pulled into a separate file in https://reviews.llvm.org/D41450. I also propagate the new completion info to completion code. I am happy to split it out if it adds too much noise for the review. =

[PATCH] D41444: [ASTImporterTest] Make testing under '-fdelayed-template-parsing' mandatory

2017-12-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D41444#960999, @a.sidorin wrote: > Also, I still think we should rather not apply template-related patches until > this testing is implemented. Gabor, Peter, do you agree? Sure, I am fine with that. Repository: rC Clang https://review

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-20 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. LG Repository: rC Clang https://reviews.llvm.org/D41365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D41450: [clangd] Pull CodeCompletionString handling logic into its own file and add unit test.

2017-12-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/CompletionString.cpp:51 + std::string Result; + Result.reserve(Text.size()); // Assume '$', '}' and '\\' are rare. + for (const auto Character

[PATCH] D41444: [ASTImporterTest] Make testing under '-fdelayed-template-parsing' mandatory

2017-12-20 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. Can you just have `getLangArgs` return a vector of vectors, and then in `testImport` run it in a loop over all sets of args? Repository: rC Clang https://reviews.llvm.org/D41444 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D38171: [clang-tidy] Implement clang-tidy check aliases

2017-12-20 Thread András Leitereg via Phabricator via cfe-commits
leanil updated this revision to Diff 127736. leanil added a comment. Remove redundant empty lines. Make list-clang-diagnostics test less strict. Update getAllDiagnostics to use std::vector. https://reviews.llvm.org/D38171 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidyDiagnosticConsume

[libcxx] r321188 - Fix the definitions of 'reference' and 'pointer' in string_view that no one uses :-). Thanks to K-ballo for the catch.

2017-12-20 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Dec 20 08:31:40 2017 New Revision: 321188 URL: http://llvm.org/viewvc/llvm-project?rev=321188&view=rev Log: Fix the definitions of 'reference' and 'pointer' in string_view that no one uses :-). Thanks to K-ballo for the catch. Added: libcxx/trunk/test/std/strings/s

[PATCH] D38171: [clang-tidy] Implement clang-tidy check aliases

2017-12-20 Thread András Leitereg via Phabricator via cfe-commits
leanil marked 2 inline comments as done. leanil added a comment. Does anyone have any more thoughts about this? https://reviews.llvm.org/D38171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-12-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked 6 inline comments as done. xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Core/CallEvent.cpp:372 + + cross_tu::CrossTranslationUnitContext &CTUCtx = + Engine->getCrossTranslationUnitContext(); dcoughlin wrote: > Can this lo

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-12-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 127525. xazax.hun marked an inline comment as not done. xazax.hun added a comment. - Address some review comments - Rebased on ToT https://reviews.llvm.org/D30691 Files: include/clang/StaticAnalyzer/Core/AnalyzerOptions.h include/clang/StaticAnalyzer/

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2017-12-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:407 + if (!NaiveCTU.hasValue()) { +NaiveCTU = getBooleanOption("experimental-enable-naive-ctu-analysis", +/*Default=*/false); This option

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2017-12-20 Thread András Leitereg via Phabricator via cfe-commits
leanil updated this revision to Diff 127739. leanil added a comment. Move negative test next to the positive ones, because the necessary macros and run-lines are already defined there. https://reviews.llvm.org/D41384 Files: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp test/Analy

[PATCH] D41399: [CodeGen] Represent array members in new-format TBAA type descriptors

2017-12-20 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added inline comments. Comment at: test/CodeGen/tbaa-array.cpp:24 +// CHECK-DAG: [[TAG_A_i]] = !{[[TYPE_A:!.*]], [[TYPE_int:!.*]], i64 0, i64 4} +// CHECK-DAG: [[TAG_C_i]] = !{[[TYPE_C:!.*]], [[TYPE_int:!.*]], i64 0, i64 16} +// CHECK-DAG: [[TYPE_A]] = !{[[TYPE_char:!.*]]

[PATCH] D41365: [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321189: [clang] Add BeforeExecute method to PrecompiledPreamble (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D41365?vs=127715&id=127740#toc Repository: rC

r321189 - [clang] Add BeforeExecute method to PrecompiledPreamble

2017-12-20 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Dec 20 08:48:56 2017 New Revision: 321189 URL: http://llvm.org/viewvc/llvm-project?rev=321189&view=rev Log: [clang] Add BeforeExecute method to PrecompiledPreamble Summary: Adds BeforeExecute method to PrecompiledPreamble to be called before Execute(). This method can

r321190 - Make DiagnosticIDs::getAllDiagnostics use std::vector. NFC.

2017-12-20 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Wed Dec 20 08:55:41 2017 New Revision: 321190 URL: http://llvm.org/viewvc/llvm-project?rev=321190&view=rev Log: Make DiagnosticIDs::getAllDiagnostics use std::vector. NFC. The size of the result vector is currently around 4600 with Flavor::WarningOrError, which makes std::vect

[PATCH] D41451: Make DiagnosticIDs::getAllDiagnostics use std::vector

2017-12-20 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun closed this revision. xazax.hun added a comment. Committed in https://reviews.llvm.org/rL321190 https://reviews.llvm.org/D41451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D41399: [CodeGen] Represent array members in new-format TBAA type descriptors

2017-12-20 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: test/CodeGen/tbaa-array.cpp:24 +// CHECK-DAG: [[TAG_A_i]] = !{[[TYPE_A:!.*]], [[TYPE_int:!.*]], i64 0, i64 4} +// CHECK-DAG: [[TAG_C_i]] = !{[[TYPE_C:!.*]], [[TYPE_int:!.*]], i64 0, i64 16} +// CHECK-DAG: [[TYPE_A]] = !{[[TYPE_char:!.*]]

[PATCH] D41454: [clangd] Add ClangdUnit diagnostics tests using annotated code.

2017-12-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, mgorny, klimek. This adds checks that our diagnostics emit correct ranges in a bunch of cases, as promised in https://reviews.llvm.org/D41118. The diagnostics-preamble test is also c

[clang-tools-extra] r321192 - [clangd] Remove an unused lambda capture.

2017-12-20 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Dec 20 09:22:56 2017 New Revision: 321192 URL: http://llvm.org/viewvc/llvm-project?rev=321192&view=rev Log: [clangd] Remove an unused lambda capture. Modified: clang-tools-extra/trunk/unittests/clangd/Annotations.cpp Modified: clang-tools-extra/trunk/unittests/clangd

[clang-tools-extra] r321193 - [clangd] Pull CodeCompletionString handling logic into its own file and add unit test.

2017-12-20 Thread Eric Liu via cfe-commits
Author: ioeric Date: Wed Dec 20 09:24:31 2017 New Revision: 321193 URL: http://llvm.org/viewvc/llvm-project?rev=321193&view=rev Log: [clangd] Pull CodeCompletionString handling logic into its own file and add unit test. Reviewers: sammccall Subscribers: klimek, mgorny, ilya-biryukov, cfe-commit

[PATCH] D41450: [clangd] Pull CodeCompletionString handling logic into its own file and add unit test.

2017-12-20 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. ioeric marked 7 inline comments as done. Closed by commit rCTE321193: [clangd] Pull CodeCompletionString handling logic into its own file and add… (authored by ioeric, committed by ). Changed prior to commit: https://revi

[PATCH] D41345: [clangd] Add more symbol information for code completion.

2017-12-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/index/Index.h:105 + /// What to insert when completing this symbol (plain text version). + std::string CompletionPlainInsertText; + /// What to insert when completing this symbol (snippet version). insert tex

[PATCH] D41444: [ASTImporterTest] Make testing under '-fdelayed-template-parsing' mandatory

2017-12-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin updated this revision to Diff 127748. a.sidorin added a comment. Test both with and without '-fdelayed-template-parsing' in C++ mode. Repository: rC Clang https://reviews.llvm.org/D41444 Files: unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp ==

[PATCH] D41399: [CodeGen] Represent array members in new-format TBAA type descriptors

2017-12-20 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 127742. kosarev added a comment. - Fixed the access size. - Added the suggested tests. https://reviews.llvm.org/D41399 Files: lib/CodeGen/CodeGenTBAA.cpp test/CodeGen/tbaa-array.cpp Index: test/CodeGen/tbaa-array.cpp ==

[PATCH] D41455: [ASTMatchers] Add isNoReturn() match narrower for FunctionDeclarations

2017-12-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added a reviewer: aaron.ballman. lebedev.ri added a project: clang. Herald added a subscriber: klimek. How to regenerate LibASTMatchersReference.html ? Repository: rC Clang https://reviews.llvm.org/D41455 Files: include/clang/ASTMatchers/ASTMatc

[PATCH] D40705: [Parser] Diagnose storage classes in template parameter declarations

2017-12-20 Thread Faisal Vali via Phabricator via cfe-commits
faisalv added a comment. Sounds good - if I don't get this done over the next seven days - would you mind just pinging me! Thanks! https://reviews.llvm.org/D40705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D41456: [clang-tidy] readability-else-after-return: also diagnose noreturn function calls.

2017-12-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: aaron.ballman, alexfh, djasper, malcolm.parsons. lebedev.ri added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. The readability-else-after-return check was not warning about an else after a call to the function t

[PATCH] D41456: [clang-tidy] readability-else-after-return: also diagnose noreturn function calls.

2017-12-20 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Depends on https://reviews.llvm.org/D41455. I'm open to suggestions re diagnostic wording. The current `'noreturn call'` seems lazy, and is basically a placeholder. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41456 __

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-20 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. Another round of review Comment at: clangd/ClangdUnit.cpp:113 + CppFilePreambleCallbacks(IncludeReferenceMap &IRM) + : IRM(IRM) {} ---

[PATCH] D41303: Add support for ObjectFormat to TargetSpecificAttr

2017-12-20 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. Aside from some minor nits, LGTM. Thanks! Comment at: include/clang/Basic/Attr.td:281 list CXXABIs; + // Specifies Object Formats for which the target appl

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/OverloadedOperatorCheck.cpp:18 + +AST_MATCHER(CXXMethodDecl, hasOverloadedOperator) { + if (Node.isCopyAssignmentOperator() || Node.isMoveAssignmentOperator()) JonasToth wrote: > I think `isOver

r321201 - Add support for ObjectFormat to TargetSpecificAttr

2017-12-20 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Wed Dec 20 10:51:08 2017 New Revision: 321201 URL: http://llvm.org/viewvc/llvm-project?rev=321201&view=rev Log: Add support for ObjectFormat to TargetSpecificAttr Looking through the code, I saw a FIXME on IFunc to switch it to a target specific attribute. In looking thro

[PATCH] D41303: Add support for ObjectFormat to TargetSpecificAttr

2017-12-20 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321201: Add support for ObjectFormat to TargetSpecificAttr (authored by erichkeane, committed by ). Changed prior to commit: https://reviews.llvm.org/D41303?vs=127159&id=127757#toc Repository: rC Cla

r321203 - [hwasan] Implement -fsanitize-recover=hwaddress.

2017-12-20 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Dec 20 11:05:44 2017 New Revision: 321203 URL: http://llvm.org/viewvc/llvm-project?rev=321203&view=rev Log: [hwasan] Implement -fsanitize-recover=hwaddress. Summary: Very similar to AddressSanitizer, with the exception of the error type encoding. Reviewers: kcc, alekse

[PATCH] D41417: [hwasan] Implement -fsanitize-recover=hwaddress.

2017-12-20 Thread Evgenii Stepanov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC321203: [hwasan] Implement -fsanitize-recover=hwaddress. (authored by eugenis, committed by ). Changed prior to commit: https://reviews.llvm.org/D41417?vs=127642&id=127760#toc Repository: rC Clang h

[PATCH] D41458: WIP: [libc++][C++17] Elementary string conversions for integral types

2017-12-20 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray created this revision. lichray added reviewers: mclow.lists, EricWF. Herald added a subscriber: mgorny. Progress: std::to_chars for integers Missing: std::from_chars References: https://wg21.link/p0067r5 https://wg21.link/p0682r1 Repository: rCXX libc++ https://reviews.llvm.org/D41

[PATCH] D41408: [analyzer] NFC: Fix nothrow operator new definition in a test.

2017-12-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/NewDelete-custom.cpp:7 -#if !LEAKS +#if !(LEAKS && !ALLOCATOR_INLINING) // expected-no-diagnostics a.sidorin wrote: > Double negation can be simplified a bit: `#if !LEAKS || ALLOCATOR_INLINING` The rest of t

[PATCH] D41406: [analyzer] Add a new checker callback, check::NewAllocator.

2017-12-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D41406#960824, @xazax.hun wrote: > Maybe `debug.AnalysisOrder` could be used to test the callback order > explicitly. This way the test could also serve as a documentation for the > callback order. Yep, totally, will do. https://reviews.llvm.

[PATCH] D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct

2017-12-20 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added inline comments. Comment at: test/Sema/builtin-object-size.c:105 +void rd36094951_IAS_builtin_object_size_assertion(IncompleteArrayStruct* p) { + __builtin___strlcpy_chk (p->session[0].string, "ab", 2, __builtin_object_size(p->session[0].string, 1)); +}

[PATCH] D40295: -fsanitize=vptr warnings on bad static types in dynamic_cast and typeid

2017-12-20 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added reviewers: vsk, thakis. vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. Thanks, lgtm. Could you wait a day or two before committing? IIRC Richard or Nico have a -fsanitize=vptr Chromium bot, and they may have further comments. https://

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2017-12-20 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2321 + !isa(ConvertType(Arg->getType())) && ArgI.getCoerceToType() == ConvertType(Ty) && ArgI.getDirectOffset() == 0) { vsapsai wrote: > rjmccall wrote: > > I t

[PATCH] D41455: [ASTMatchers] Add isNoReturn() match narrower for FunctionDeclarations

2017-12-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. You regenerate the HTML by running `clang/docs/tools/dump_ast_matchers.py`. Comment at: unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:1775 + EXPECT_TRUE(notMatches("void func();", functionDecl(isNoReturn(; + EXPECT_TRUE(notMatches("void

[PATCH] D41456: [clang-tidy] readability-else-after-return: also diagnose noreturn function calls.

2017-12-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/ElseAfterReturnCheck.cpp:43 + for (const auto *BindingName : + {"return", "continue", "break", "throw", "noreturn call"}) if (Result.Nodes.getNodeAs(BindingName)) You've spotted t

[PATCH] D23934: Add a -ffixed-date-time= flag that sets the initial value of __DATE__, __TIME__, __TIMESTAMP__

2017-12-20 Thread Ed Maste via Phabricator via cfe-commits
emaste added a comment. Ping? https://reviews.llvm.org/D23934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39239: [AST] Incorrectly qualified unscoped enumeration as template actual parameter.

2017-12-20 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a project: debug-info. probinson accepted this revision. probinson added a comment. This revision is now accepted and ready to land. With the GDB test results and LLDB able to handle it, this LGTM. Carlos, do you have commit access? https://reviews.llvm.org/D39239

[PATCH] D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct

2017-12-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D41405#960008, @george.burgess.iv wrote: > LGTM assuming my nit gets addressed. > > Thank you! > > > Maybe someone who's more familiar with this builtin could point to the > > cause of this discrepancy > > Yeah, the documentation for this bui

r321222 - Fix an assertion failure regression in isDesignatorAtObjectEnd for

2017-12-20 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Dec 20 13:03:38 2017 New Revision: 321222 URL: http://llvm.org/viewvc/llvm-project?rev=321222&view=rev Log: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct The commit r316245 introduced a regr

[PATCH] D41405: Fix an assertion failure regression in isDesignatorAtObjectEnd for __builtin_object_size with incomplete array type in struct

2017-12-20 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arphaman marked 2 inline comments as done. Closed by commit rC321222: Fix an assertion failure regression in isDesignatorAtObjectEnd for (authored by arphaman, committed by ). Changed prior to commit: https://reviews.llvm

[PATCH] D41311: [CodeGen] Fix crash when a function taking transparent union is redeclared.

2017-12-20 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 127779. vsapsai added a comment. - Address review comment, compare ArgI type with Arg type. Update tests to account for coerced store when types don't match. https://reviews.llvm.org/D41311 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/kr-func

[PATCH] D40448: Add a printing policy for AST dumping

2017-12-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. P-p-p-power ping! :-) https://reviews.llvm.org/D40448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >