r330184 - Add some infuriatingly necessary comments to this test case.

2018-04-17 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Tue Apr 17 04:08:05 2018 New Revision: 330184 URL: http://llvm.org/viewvc/llvm-project?rev=330184=rev Log: Add some infuriatingly necessary comments to this test case. Without these comments, by "luck" the contents of SomeKit's SKWidget.h are precisely the same as

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-17 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 142750. paulsemel added a comment. Removed the two existing types. Added the correct format sizing. Added tests for those formats. These version is now relying on the previous patch : https://reviews.llvm.org/D45665 Repository: rC Clang

[PATCH] D45718: Allow registering custom statically-linked analyzer checkers

2018-04-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. alexfh added a reviewer: george.karpenkov. Herald added a subscriber: a.sidorin. Add an extension point to allow registration of statically-linked Clang Static Analyzer checkers that are not a part of the Clang tree. This extension point employs the mechanism used

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Thank you for investigating and fixing this! One comment re: the test below. Comment at: test/clang-tidy/read_file_config.cpp:5 +// RUN: echo '[{"command": "cc -c

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-17 Thread Whisperity via Phabricator via cfe-commits
whisperity requested changes to this revision. whisperity added a comment. This revision now requires changes to proceed. There is something that came up in my mind: Consider a construct like this: class A { A() { memset(X, 0, 10 * sizeof(int)); } int X[10]; }; I

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-04-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaExpr.cpp:9816 +RHS = S.ImpCastExprToType(RHS.get(), Type, CK_BitCast); + } else { +// C++2a [expr.spaceship]p4 EricWF wrote: > rsmith wrote: > > We still need to apply the usual arithmetic

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In https://reviews.llvm.org/D45532#1068700, @Szelethus wrote: > In https://reviews.llvm.org/D45532#1068647, @dkrupp wrote: > > > This bug report also mentions assignment operator. But for that a warning > > may be not so useful. In that case the members of the

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-17 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. Sure. Basically, the previous code would not generate the USR for the function's parameters. The issue was that SM.getFileEntryForID would return NULL because there is no actual file, that's why I changed to get the presumedLoc and build the name using the

[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-04-17 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/SemaOverload.cpp:9218-9219 +// --- F2 is a rewritten candidate ([over.match.oper]) and F1 is not. +if (Cand2.getRewrittenKind() && !Cand1.getRewrittenKind()) + return true; +if (Cand1.getRewrittenKind() &&

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Could you elaborate on why the old behaviour is broken? Repository: rC Clang https://reviews.llvm.org/D42966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-04-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. OK, I didn't get through all the detail, but we should talk about the MR stuff today :) Comment at: clang-doc/BitcodeReader.cpp:25 +void ClangDocBitcodeReader::storeData(SymbolID , llvm::StringRef Blob) { + assert(Record[0] == 20); + // First

[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-04-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Definitely some interesting questions to take to CWG here. :) Comment at: lib/Sema/SemaOverload.cpp:9218-9219 +// --- F2 is a rewritten candidate ([over.match.oper]) and F1 is not. +if (Cand2.getRewrittenKind() && !Cand1.getRewrittenKind()) +

[PATCH] D38615: [libclang] Only mark CXCursors for explicit attributes with a type

2018-04-17 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D38615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Greg Parker via Phabricator via cfe-commits
gparker42 added a comment. Note that we recently relaxed a similar diagnostic for `NSNumber *` in the static analyzer. Such code is semantically similar to `inttype *`. https://reviews.llvm.org/D44044 https://reviews.llvm.org/D45601 ___

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. A random data point from trying this patch on the LibreOffice code base: - a little over 100 cases that are easily identified as false positives (many of the form "if (p) *p = ...") - two or three cases that looked suspicious on first glance but turned out to be false

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/read_file_config.cpp:1 +// RUN: mkdir -p %T/read-file-config/ +// RUN: cp %s %T/read-file-config/test.cpp JonasToth wrote: > Will this work on windows? I believe it works on windows (although I don't have

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. *hust* /llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp I will check this one first, before we get crazy and implemented something twice. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679

[PATCH] D45692: [clangd] Fix "fail to create file URI" warnings in FileIndexTest.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330182: [clangd] Fix fail to create file URI warnings in FileIndexTest. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[clang-tools-extra] r330182 - [clangd] Fix "fail to create file URI" warnings in FileIndexTest.

2018-04-17 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Apr 17 01:34:50 2018 New Revision: 330182 URL: http://llvm.org/viewvc/llvm-project?rev=330182=rev Log: [clangd] Fix "fail to create file URI" warnings in FileIndexTest. Summary: When running the FileIndexTest, it shows "Failed to create an URI for file XXX: not a valid

[PATCH] D45717: [clangd] Using index for GoToDefinition.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: MaskRay, ioeric, jkorous-apple, ilya-biryukov, klimek. This patch adds index support for GoToDefinition -- when we don't get the definition from local AST, we query our index (Static) index to get it.

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/read_file_config.cpp:1 +// RUN: mkdir -p %T/read-file-config/ +// RUN: cp %s %T/read-file-config/test.cpp Will this work on windows? Repository: rCTE Clang Tools Extra

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Short note here too: I think having `isModified` return a track record, like a vector for each 1. modifications 2. non-const handle taking 3. (const usages) would be nice. Every user can decide how to react to it. Then the function would be more like `usageRecord`

[PATCH] D44888: [RISCV] Default enable linker relaxation and add -mrelax, -mno-relax flags

2018-04-17 Thread Shiva Chen via Phabricator via cfe-commits
shiva0217 added a comment. In https://reviews.llvm.org/D44888#1068806, @asb wrote: > Thanks Kito. -mrelax and -mno-relax currently only affect the backend. For > completeness, I think this patch needs to pass the appropriate flag to the > linker depending on relax/no-relax. Hi Alex.

[PATCH] D45444: [clang-tidy] WIP: implement new check for const-correctness

2018-04-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D45444#1069488, @shuaiwang wrote: > I've updated https://reviews.llvm.org/D45679 and I think the `isModified()` > function there is now sufficiently covering the cases you've covered here and > can be used as a good starting version if you

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D36390: Fix overloaded static functions in SemaCodeComplete

2018-04-17 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Huch, seems already submitted. Ignore :> Repository: rL LLVM 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] D36390: Fix overloaded static functions in SemaCodeComplete

2018-04-17 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Herald added a subscriber: llvm-commits. Ping Repository: rL LLVM 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] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D38615: [libclang] Only mark CXCursors for explicit attributes with a type

2018-04-17 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping https://reviews.llvm.org/D38615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D45665: [builtin-dump-struct] printf formats generation testing

2018-04-17 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. In https://reviews.llvm.org/D45665#1069075, @aaron.ballman wrote: > LGTM! Nice to hear ! As for the last time, as I don't have any rights to push this, I would really appreciate if you could do it for me ! :) Repository: rC Clang https://reviews.llvm.org/D45665

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2018-04-17 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. It looks like this caused a clang-cl regression https://bugs.llvm.org/show_bug.cgi?id=37146 "clang-cl emits special functions for non-trivial C-structs ('__destructor_8') introduced for Objective-C". Repository: rL LLVM https://reviews.llvm.org/D41228

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris accepted this revision. dberris added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D45716#1069567, @dberris wrote: > In https://reviews.llvm.org/D45716#1069557, @kpw wrote: > > > My editor got a bit carried away with automatically

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. In https://reviews.llvm.org/D45716#1069557, @kpw wrote: > My editor got a bit carried away with automatically clang-formatting > lib/CodeGen/CodeGenFunction.cpp. I'll fix that so that I'm not messing up the > revision history. Yes please. :) Also, if you can add to

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 142740. devnexen added a comment. - Making base gcc 4.2.1 stdc++ having profile version supported as well. https://reviews.llvm.org/D45662 Files: lib/Driver/ToolChains/OpenBSD.cpp lib/Driver/ToolChains/OpenBSD.h Index:

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang marked an inline comment as done. shuaiwang added a comment. Hi @alexfh, @hokein, @JonasToth, I've updated this diff to be just adding the helper function `isModified()` with a set of dedicated unit tests. What do you think of the approach of getting this change committed and then

[PATCH] D45679: [clang-tidy] Add a new check, readability-unmodified-non-const-variable, that finds declarations of non-const variables that never get modified.

2018-04-17 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 142739. shuaiwang added a comment. Change to just add a helper function `isModified` Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files: clang-tidy/utils/ASTUtils.cpp clang-tidy/utils/ASTUtils.h

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Keith via Phabricator via cfe-commits
kpw added a comment. My editor got a bit carried away with automatically clang-formatting lib/CodeGen/CodeGenFunction.cpp. I'll fix that so that I'm not messing up the revision history. Repository: rC Clang https://reviews.llvm.org/D45716 ___

<    1   2