[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-12 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. > It might be worth adding some very simple get/set tests to ensure that > properties are set as intended. clang_PrintingPolicy_setProperty is already called in c-index-test.c and covered with test/Index/print-display-names.cpp. Do you have another kind of test in mind? I

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-12 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 129591. nik added a comment. Addressed comments. Repository: rC Clang https://reviews.llvm.org/D39903 Files: include/clang-c/Index.h test/Index/print-display-names.cpp tools/c-index-test/c-index-test.c tools/libclang/CIndex.cpp tools/libclang/libcl

[PATCH] D41897: Fixing a crash in Sema.

2018-01-12 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added inline comments. Comment at: Sema/SemaDeclCXX.cpp:2426 +// Skip all dependent types in templates being used as base specifiers. +// Checks below assume that base specifier is a CXXRecord. +if (BaseType->isDependentType()) { aaron.b

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-12 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Looking good, only a few nits. Comment at: tools/libclang/CIndex.cpp:4782 + + return 0; +} Might be worth asserting here. Comment at: unittests/libclang/LibclangTest.cpp:596 +TEST_F(LibclangPrintingPolicyTest, GetPrope

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-12 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik marked an inline comment as done. nik added inline comments. Comment at: tools/libclang/CIndex.cpp:4782 + + return 0; +} jbcoe wrote: > Might be worth asserting here. Good idea. I've done the same for the setter. Comment at: unittests/libc

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-12 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 129600. nik marked an inline comment as done. nik added a comment. Added assert() for getter/setter. Repository: rC Clang https://reviews.llvm.org/D39903 Files: include/clang-c/Index.h test/Index/print-display-names.cpp tools/c-index-test/c-index-test.

[PATCH] D41989: [CodeComplete] Add an option to omit results from the preamble.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: bkramer, ilya-biryukov. Herald added a subscriber: cfe-commits. Enumerating the contents of a namespace or global scope will omit any decls that aren't already loaded, instead of deserializing them from the PCH. This allows a fast hybrid

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

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. ping... just realized this didn't go in Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread Alex Bradbury via Phabricator via cfe-commits
asb updated this revision to Diff 129607. asb marked 9 inline comments as done. asb added a comment. Herald added a subscriber: niosHD. I've addressed all outstanding comments (a number of response are inline). Additionally: Floats in unions are always passed in GPRs (as clarified here

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread Alex Bradbury via Phabricator via cfe-commits
asb added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1937 +RetAttrs.addAttribute(llvm::Attribute::ZExt); +} // FALL THROUGH rjmccall wrote: > I feel like a better design would be to record whether to do a sext or a zext > in the ABIArgI

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-12 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe requested changes to this revision. jbcoe added inline comments. This revision now requires changes to proceed. Comment at: unittests/libclang/LibclangTest.cpp:596 +TEST_F(LibclangPrintingPolicyTest, GetProperty) { + EXPECT_EQ(2U, clang_PrintingPolicy_getProperty(Policy,

[PATCH] D41989: [CodeComplete] Add an option to omit results from the preamble.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This is basically all plumbing, so I've marked the two lines that actually do something :-) Comment at: lib/Sema/SemaLookup.cpp:3517 // Ensure all external identifiers are in the identifier table. -if (IdentifierInfoLookup *External = Idents

[PATCH] D41990: [Frontend] Allow to use PrecompiledPreamble without calling CanReuse

2018-01-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: bkramer, sammccall. The new method 'OverridePreamble' allows to override the preamble of any source file without checking if preamble bounds or dependencies were changed. This is used for completion in clangd. Repository: rC

[PATCH] D41991: [clangd] Always use preamble (even stale) for code completion

2018-01-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: bkramer, sammccall. Herald added a subscriber: klimek. This improves performance of code completion, because we avoid stating the files from the preamble and never attempt to parse the files without using the preamble if it's prov

[clang-tools-extra] r322370 - [clangd] Don't navigate to forward class declaration when go to definition.

2018-01-12 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Jan 12 06:21:10 2018 New Revision: 322370 URL: http://llvm.org/viewvc/llvm-project?rev=322370&view=rev Log: [clangd] Don't navigate to forward class declaration when go to definition. Summary: For some cases, GoToDefinition will navigate to the forward class declaration,

[PATCH] D41661: [clangd] Don't navigate to forward class declaration when go to definition.

2018-01-12 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322370: [clangd] Don't navigate to forward class declaration when go to definition. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llv

[PATCH] D41992: [libcxx] Avoid spurious construction of valarray elements

2018-01-12 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki created this revision. miyuki added reviewers: EricWF, mclow.lists. Currently libc++ implements some operations on valarray by using the resize method. This method has a parameter with a default value. Because of this, valarray may spuriously construct and destruct objects of valarray's ele

[PATCH] D41989: [CodeComplete] Add an option to omit results from the preamble.

2018-01-12 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. LGTM modulo the comment about variable name. Comment at: lib/Sema/SemaLookup.cpp:3502 + bool IncludeDependentBases, +

[PATCH] D41937: [WebAssembly] supports -stdlib=libc++ switch

2018-01-12 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. lgtm https://reviews.llvm.org/D41937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D20124: [PCH] Serialize skipped preprocessor ranges

2018-01-12 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. LGTM, sorry for the delay. https://reviews.llvm.org/D20124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D41990: [Frontend] Allow to use PrecompiledPreamble without calling CanReuse

2018-01-12 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: include/clang/Frontend/PrecompiledPreamble.h:107 /// is accessible. - /// For in-memory preambles, PrecompiledPreamble instance continues to own -

[PATCH] D41989: [CodeComplete] Add an option to omit results from the preamble.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 129618. sammccall added a comment. Load -> LoadExternal Repository: rC Clang https://reviews.llvm.org/D41989 Files: include/clang-c/Index.h include/clang/Sema/CodeCompleteConsumer.h include/clang/Sema/CodeCompleteOptions.h include/clang/Sema/Se

r322371 - [CodeComplete] Add an option to omit results from the preamble.

2018-01-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 12 06:51:47 2018 New Revision: 322371 URL: http://llvm.org/viewvc/llvm-project?rev=322371&view=rev Log: [CodeComplete] Add an option to omit results from the preamble. Summary: Enumerating the contents of a namespace or global scope will omit any decls that aren't

[PATCH] D41989: [CodeComplete] Add an option to omit results from the preamble.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322371: [CodeComplete] Add an option to omit results from the preamble. (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D41989?vs=129618&id=129620#toc Reposito

[PATCH] D41989: [CodeComplete] Add an option to omit results from the preamble.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322371: [CodeComplete] Add an option to omit results from the preamble. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D41

[PATCH] D40780: [clangd] Incorporate fuzzy-match into result rankings.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added a comment. Tested in this file: #include #include #include int main() { std::^ } Before this change: u -> __has_argument_type, __has_first_argument_type... un -> __has_argument_type, __has_first_argument_type... u_p ->

[PATCH] D40780: [clangd] Incorporate fuzzy-match into result rankings.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 129622. sammccall marked 2 inline comments as done. sammccall added a comment. Rebase, and address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40780 Files: clangd/CodeComplete.cpp clangd/FuzzyMatch.h clangd/Protocol.h

[PATCH] D41897: Fixing a crash in Sema.

2018-01-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: SemaCXX/base-class-ambiguity-check.cpp:1 +// RUN: %clang_cc1 -fsyntax-only %s + jkorous-apple wrote: > aaron.ballman wrote: > > jkorous-apple wrote: > > > aaron.ballman wrote: > > > > This run line isn't testing an

[PATCH] D41897: Fixing a crash in Sema.

2018-01-12 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added inline comments. Comment at: SemaCXX/base-class-ambiguity-check.cpp:1 +// RUN: %clang_cc1 -fsyntax-only %s + aaron.ballman wrote: > jkorous-apple wrote: > > aaron.ballman wrote: > > > jkorous-apple wrote: > > > > aaron.ballman wrote: > > > > >

[PATCH] D40780: [clangd] Incorporate fuzzy-match into result rankings.

2018-01-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Comment at: test/clangd/completion-fuzzy.test:1 +# RUN: clangd -pretty -run-synchronously < %s | FileCheck %s +# It is absolutely vital that this file has CRLF line end

[PATCH] D41897: Fixing a crash in Sema.

2018-01-12 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple updated this revision to Diff 129631. jkorous-apple added a comment. Fixed test based on Aaron's comments. https://reviews.llvm.org/D41897 Files: Sema/SemaDeclCXX.cpp SemaCXX/base-class-ambiguity-check.cpp Index: SemaCXX/base-class-ambiguity-check.cpp ===

[PATCH] D41897: Fixing a crash in Sema.

2018-01-12 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. LGTM, thank you! https://reviews.llvm.org/D41897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D41937: [WebAssembly] supports -stdlib=libc++ switch

2018-01-12 Thread Patrick Cheng via Phabricator via cfe-commits
patcheng added a comment. Thanks @sbc100. BTW I don't have commit access. When it's ready to be committed, I would need help with that. Thanks https://reviews.llvm.org/D41937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D41897: Fixing a crash in Sema.

2018-01-12 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added a comment. Thank you! https://reviews.llvm.org/D41897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41897: Fixing a crash in Sema.

2018-01-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D41897#974618, @jkorous-apple wrote: > Thank you! Do you have commit privileges, or would you like me to commit this on your behalf? https://reviews.llvm.org/D41897 ___ cfe-commits maili

[PATCH] D41897: Fixing a crash in Sema.

2018-01-12 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple added a comment. I do. Will commit this in a minute. https://reviews.llvm.org/D41897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40780: [clangd] Incorporate fuzzy-match into result rankings.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 129633. sammccall marked an inline comment as done. sammccall added a comment. Unit test instead of lit test. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40780 Files: clangd/CodeComplete.cpp clangd/FuzzyMatch.h clangd/Protocol.h

[PATCH] D40780: [clangd] Incorporate fuzzy-match into result rankings.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: test/clangd/completion-fuzzy.test:1 +# RUN: clangd -pretty -run-synchronously < %s | FileCheck %s +# It is absolutely vital that this file has CRLF line endings. hokein wrote: > nit: any reason not using unittest `Code

[clang-tools-extra] r322377 - [clangd] Incorporate fuzzy-match into result rankings.

2018-01-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 12 08:16:09 2018 New Revision: 322377 URL: http://llvm.org/viewvc/llvm-project?rev=322377&view=rev Log: [clangd] Incorporate fuzzy-match into result rankings. Summary: The scoring function is fuzzy-match-quality * existing quality score. Reviewers: ioeric Subscri

[PATCH] D40780: [clangd] Incorporate fuzzy-match into result rankings.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322377: [clangd] Incorporate fuzzy-match into result rankings. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D40780?v

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-12 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 129635. nik added a comment. What about this? :) Repository: rC Clang https://reviews.llvm.org/D39903 Files: include/clang-c/Index.h test/Index/print-display-names.cpp tools/c-index-test/c-index-test.c tools/libclang/CIndex.cpp tools/libclang/libcl

[PATCH] D41980: Add tests for llvm-bcanalyzer stream types

2018-01-12 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: test/PCH/include-stream-type.cpp:7 +// RUN: cp %S/Inputs/pragma-once2.h %t-dir +// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %t-dir/pragma-once2-pch.h +// RUN: llvm-bcanalyzer -dump %t | FileCheck %s You may need to

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1937 +RetAttrs.addAttribute(llvm::Attribute::ZExt); +} // FALL THROUGH asb wrote: > rjmccall wrote: > > I feel like a better design would be to record whether to do a sext or a >

[PATCH] D41996: [clangd] Code completion uses Sema for NS-level things in the current file.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added subscribers: cfe-commits, ilya-biryukov, klimek. To stay fast, it avoids deserializing anything outside the current file, by disabling the LoadExternal code completion option added in r322377, when the index is enabl

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-12 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. Sorry for the delay in getting back to this, but testing this by building it explicitly for N32 (I built a full N32 compiler + libunwind and modified the test setup py to compile for N322) and I'm getting crashes on the return path in _Unwind_Backtrace. The problem occ

[PATCH] D41980: Add tests for llvm-bcanalyzer stream types

2018-01-12 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added inline comments. Comment at: test/PCH/include-stream-type.cpp:7 +// RUN: cp %S/Inputs/pragma-once2.h %t-dir +// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %t-dir/pragma-once2-pch.h +// RUN: llvm-bcanalyzer -dump %t | FileCheck %s aprantl wrote:

[PATCH] D41980: Add tests for llvm-bcanalyzer stream types

2018-01-12 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl accepted this revision. aprantl added inline comments. This revision is now accepted and ready to land. Comment at: test/PCH/include-stream-type.cpp:7 +// RUN: cp %S/Inputs/pragma-once2.h %t-dir +// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %t-dir/pragma-once2-pch.h +

[clang-tools-extra] r322379 - [clangd] Include debugging tags for both static and dynamic index. NFC

2018-01-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 12 09:09:49 2018 New Revision: 322379 URL: http://llvm.org/viewvc/llvm-project?rev=322379&view=rev Log: [clangd] Include debugging tags for both static and dynamic index. NFC Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp clang-tools-extra/trunk/

[PATCH] D41809: Clang counterpart change for fuzzer FreeBSD support

2018-01-12 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. In https://reviews.llvm.org/D41809#969475, @kimgr wrote: > Typo in the commit title: buzzer :) Changed ... just to follow-up the now accepted change of this one https://reviews.llvm.org/D41642 https://reviews.llvm.org/D41809 __

[PATCH] D41655: [clang-tidy] New check bugprone-unused-return-value

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. High Integrity C++ has the rule `17.5.1 Do not ignore the result of std::remove, std::remove_if or std::unique`. Do we want to add those to the preconfigured list? https://reviews.llvm.org/D41655 ___ cfe-commits mailing

[PATCH] D41996: [clangd] Code completion uses Sema for NS-level things in the current file.

2018-01-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. nice, LGTM. By `r322377`, I think you mean `r322371`. We also need to set `CollectorOpts.IndexMainFiles` to `false` in `FileIndex.cpp::indexAST` -- we don't need dynamic index to catch the s

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

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Decl.h:3529 + /// Basic properties of non-trivial C structs. + bool HasStrongObjCPointer : 1; + Is it interesting to track all the individual reasons that a struct is non-trivial at the struct level

[PATCH] D41963: [clang-tidy] Adding Fuchsia checker for thread local storage.

2018-01-12 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 129647. juliehockett marked 3 inline comments as done. juliehockett added a comment. Fixing comments https://reviews.llvm.org/D41963 Files: clang-tidy/fuchsia/CMakeLists.txt clang-tidy/fuchsia/FuchsiaTidyModule.cpp clang-tidy/fuchsia/ThreadLocalC

[PATCH] D41998: [clang-tidy] Expand readability-redundant-smartptr-get to understand implicit converions to bool in more contexts.

2018-01-12 Thread Samuel Benzaquen via Phabricator via cfe-commits
sbenza created this revision. sbenza added a reviewer: hokein. Herald added subscribers: cfe-commits, xazax.hun, klimek. Expand readability-redundant-smartptr-get to understand implicit converions to bool in more contexts. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41998 F

r322382 - [WebAssembly] Support -stdlib=libc++ switch

2018-01-12 Thread Sam Clegg via cfe-commits
Author: sbc Date: Fri Jan 12 09:54:49 2018 New Revision: 322382 URL: http://llvm.org/viewvc/llvm-project?rev=322382&view=rev Log: [WebAssembly] Support -stdlib=libc++ switch Referenced implementation from Fuchsia and Darwin Toolchain. Still only support CST_Libcxx. Now checks that the argument i

[PATCH] D41937: [WebAssembly] supports -stdlib=libc++ switch

2018-01-12 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322382: [WebAssembly] Support -stdlib=libc++ switch (authored by sbc, committed by ). Changed prior to commit: https://reviews.llvm.org/D41937?vs=129572&id=129649#toc Repository: rC Clang https://re

[PATCH] D41788: [DeclPrinter] Fix two cases that crash clang -ast-print.

2018-01-12 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. @arphaman: ping. https://reviews.llvm.org/D41788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41996: [clangd] Code completion uses Sema for NS-level things in the current file.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D41996#974751, @hokein wrote: > nice, LGTM. > > By `r322377`, I think you mean `r322371`. Done. > We also need to set `CollectorOpts.IndexMainFiles` to `false` in > `FileIndex.cpp::indexAST` -- we don't need dynamic index to catch the sy

[PATCH] D41999: Refactor handling of signext/zeroext in ABIArgInfo

2018-01-12 Thread Alex Bradbury via Phabricator via cfe-commits
asb created this revision. asb added a reviewer: rjmccall. Herald added subscribers: cfe-commits, arichardson. As @rjmccall suggested in https://reviews.llvm.org/D40023, we can get rid of ABIInfo::shouldSignExtUnsignedType (used to handle cases like the Mips calling convention where 32-bit integ

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread Alex Bradbury via Phabricator via cfe-commits
asb added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1937 +RetAttrs.addAttribute(llvm::Attribute::ZExt); +} // FALL THROUGH rjmccall wrote: > asb wrote: > > rjmccall wrote: > > > I feel like a better design would be to record whether to

[PATCH] D41999: Refactor handling of signext/zeroext in ABIArgInfo

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, that looks great. I appreciate you doing this. Repository: rC Clang https://reviews.llvm.org/D41999 ___ cfe-commits mailing list

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1937 +RetAttrs.addAttribute(llvm::Attribute::ZExt); +} // FALL THROUGH asb wrote: > rjmccall wrote: > > asb wrote: > > > rjmccall wrote: > > > > I feel like a better design would

[PATCH] D41809: Clang counterpart change for fuzzer FreeBSD support

2018-01-12 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. Looks good, please improve the description of the commit (and not your authorship that will be preserved in the commit message). Once accepted by another developer, I can commit it for you. https://reviews.llvm.org/D41809

[PATCH] D42001: [Driver] Add "did you mean?" suggestions to -cc1as

2018-01-12 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: v.g.vassilev, bruno. In https://reviews.llvm.org/D41733, the driver was modified such that, when a user provided a mispelled option such as `-hel`, it would suggest a valid option with a nearby edit distance: "did you mean '-help'?". Add

[clang-tools-extra] r322387 - [clangd] Code completion uses Sema for NS-level things in the current file.

2018-01-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Jan 12 10:30:08 2018 New Revision: 322387 URL: http://llvm.org/viewvc/llvm-project?rev=322387&view=rev Log: [clangd] Code completion uses Sema for NS-level things in the current file. Summary: To stay fast, it avoids deserializing anything outside the current file, by

[PATCH] D41996: [clangd] Code completion uses Sema for NS-level things in the current file.

2018-01-12 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322387: [clangd] Code completion uses Sema for NS-level things in the current file. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

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

2018-01-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/AST/Type.h:1148 +DK_objc_weak_lifetime, +DK_c_struct_strong_field }; rjmccall wrote: > I don't think you want to refer to the fact that the C struct specifically > contains a __strong field her

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-12 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added a comment. To be clear, are you getting the failure running libunwind's test suite or your own test? I've managed to get libunwind to cross-compile for me using GCC 6.3.0 on FreeBSD for O32, N32, and N64, but only to build the library, not the tests. I've been running a simple C+

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-12 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. This was libunwind's test suite: Compiled test failed unexpectedly! Testing Time: 0.53s Failing Tests (1): libunwind :: libunwind_02.pass.cpp Expected Passes: 3 Unexpected Failures: 1 The hacky pat

[PATCH] D42001: [Driver] Add "did you mean?" suggestions to -cc1as

2018-01-12 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D42001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

r322390 - [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-12 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Fri Jan 12 10:54:35 2018 New Revision: 322390 URL: http://llvm.org/viewvc/llvm-project?rev=322390&view=rev Log: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral. Fix makes the loop in LexAngledStringLiteral more like the loops in LexStringLiteral, LexCharConst

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-12 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322390: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral. (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D41423?vs=129379&id=129666#toc Repositor

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 3 inline comments as done. JonasToth added inline comments. Comment at: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp:20 + +AST_MATCHER(GotoStmt, isForwardJumping) { + lebedev.ri wrote: > JonasToth wrote: > > lebedev.ri wrote: > > > It would be

[PATCH] D42004: [Driver] Suggest valid integrated tools

2018-01-12 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: sepavloff, bkramer, phosek. There are only two valid integrated Clang driver tools: `-cc1` and `-cc1as`. If a user asks for an unknown tool, such as `-cc1asphalt`, an error message is displayed to indicate that there is no such tool, but

r322393 - [OPENMP] Replace calls of getAssociatedStmt().

2018-01-12 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Jan 12 11:39:11 2018 New Revision: 322393 URL: http://llvm.org/viewvc/llvm-project?rev=322393&view=rev Log: [OPENMP] Replace calls of getAssociatedStmt(). getAssociatedStmt() returns the outermost captured statement for the OpenMP directive. It may return incorrect regio

Re: r322390 - [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-12 Thread Volodymyr Sapsai via cfe-commits
Hans, I am nominating this change to be merged into 6.0.0 release branch. Thanks, Volodymyr > On Jan 12, 2018, at 10:54, Volodymyr Sapsai via cfe-commits > wrote: > > Author: vsapsai > Date: Fri Jan 12 10:54:35 2018 > New Revision: 322390 > > URL: http://llvm.org/viewvc/llvm-project?rev=32239

[PATCH] D42005: [docs] Use monospace for PCH option flags

2018-01-12 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. modocache added reviewers: sepavloff, aaron.ballman. Use monospace for option flags in the PCH section, instead of the italics that were being used previously. I believe these used to be links, for which single backticks would have been appropriate, but since they

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-12 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. Um, I now appear to be getting different results for running under QEMU doing it the proper way. I was previously rebuilding the failing test by hand and running under qemu. I don't believe I changed anything important, I'll have to take a longer look. If you define an

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

2018-01-12 Thread András Leitereg via Phabricator via cfe-commits
leanil updated this revision to Diff 129676. leanil marked an inline comment as done. leanil added a comment. Measure array size in bytes instead of elements. https://reviews.llvm.org/D41384 Files: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp test/Analysis/security-syntax-checks.

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129677. JonasToth marked 8 inline comments as done. JonasToth added a comment. - address review comments - add better documentation with code examples Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41815 Files: clang-tidy/cppcoreguideli

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

2018-01-12 Thread András Leitereg via Phabricator via cfe-commits
leanil marked 2 inline comments as done. leanil added a comment. In https://reviews.llvm.org/D41384#973851, @NoQ wrote: > Do you have commit access or should someone else commit it for you? I don't have, please commit it. Comment at: lib/StaticAnalyzer/Checkers/CheckSecurity

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

2018-01-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:517 +if (const auto *Array = dyn_cast( +DeclRef->getDecl()->getType().getTypePtr())) { + unsigned long long ArraySize = Array->getSize().getLimitedValue();

[PATCH] D41999: Refactor handling of signext/zeroext in ABIArgInfo

2018-01-12 Thread Alex Bradbury via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322396: Refactor handling of signext/zeroext in ABIArgInfo (authored by asb, committed by ). Repository: rC Clang https://reviews.llvm.org/D41999 Files: include/clang/CodeGen/CGFunctionInfo.h lib/

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

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Type.h:1148 +DK_objc_weak_lifetime, +DK_c_struct_strong_field }; ahatanak wrote: > rjmccall wrote: > > I don't think you want to refer to the fact that the C struct specifically > > contain

[PATCH] D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26

2018-01-12 Thread Szabolcs Nagy via Phabricator via cfe-commits
nsz added a comment. In https://reviews.llvm.org/D40673#973638, @efriedma wrote: > > as this patch is committed clang is broken (cannot use glibc headers) > > This patch was supposed to *fix* compatibility with the glibc headers. If it > doesn't, we should clearly revert it... but we need to fi

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 5 inline comments as done. JonasToth added inline comments. Comment at: docs/ReleaseNotes.rst:63 + + The usage of ``goto`` has been discouraged for a long time and is diagnosed + with this check. Eugene.Zelenko wrote: > I think will be good ide

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread Alex Bradbury via Phabricator via cfe-commits
asb updated this revision to Diff 129683. asb marked 8 inline comments as done. asb added a comment. Rebase after ABIArgInfo signext/zeroext refactoring https://reviews.llvm.org/D41999 / https://reviews.llvm.org/rL322396. We no longer need to modify CGCall.cpp for unsigned 32-bit return values t

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129684. JonasToth added a comment. - simplified the code and merged diagnostics Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41815 Files: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp clang-tidy/cppcoreguidelines/AvoidGotoCheck.h

[PATCH] D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @sbenza and/or @klimek did you have time to address the stackoverflow caused from the ASTMatchers? I forgot to add the link to the original break: http://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan/5470/consoleFull#17462642768254eaf0-7326-4999-85b0-388101f2d

[PATCH] D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129686. JonasToth added a comment. - get up to date to 7.0 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40737 Files: clang-tidy/hicpp/CMakeLists.txt clang-tidy/hicpp/HICPPTidyModule.cpp clang-tidy/hicpp/MultiwayPathsCoveredCheck.c

[PATCH] D41976: Low-hanging fruit optimization in string::__move_assign().

2018-01-12 Thread Timothy VanSlyke via Phabricator via cfe-commits
tvanslyke updated this revision to Diff 129685. tvanslyke added a comment. I went ahead and just pulled it out to a small inline member function and added it to __copy_assign_alloc(). Removed some other redundancies. https://reviews.llvm.org/D41976 Files: string Index: string

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-12 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added a comment. In https://reviews.llvm.org/D39074#974913, @sdardis wrote: > This was libunwind's test suite: > > Compiled test failed unexpectedly! > > Testing Time: 0.53s > > Failing Tests (1): > libunwind :: libunwind_02.pass.cp

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129690. JonasToth marked 3 inline comments as done. JonasToth added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41648 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguideli

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129691. JonasToth added a comment. - minor issues fixed Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41648 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-avoid-goto.rst:6-7 + +The usage of ``goto`` has been discouraged for a long time and is diagnosed +with this check. + JonasToth wrote: > aaron.ballman wrote: > > This doesn

[PATCH] D40854: [clang-tidy] WIP implement cppcoreguidelines check for mixed integer arithmetic

2018-01-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129693. JonasToth added a comment. rebase to 7.0.0 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40854 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppco

[PATCH] D39074: [libunwind][MIPS]: Add support for unwinding in N32 processes.

2018-01-12 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. I just checked both my qemu copy and on my mips64 machine and it seems to be a a copy / paste error. Reposting here directly from my machines: MIPS64: diff --git a/test/libunwind/test/config.py b/test/libunwind/test/config.py index 2a0c828..a8952c3 100644 --- a/t

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks. LGTM, but you should wait for Eli's sign-off, too. https://reviews.llvm.org/D40023 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D41976: Low-hanging fruit optimization in string::__move_assign().

2018-01-12 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added reviewers: EricWF, mclow.lists, hiraditya. vsk added a comment. Adding some folks who may be interested. https://reviews.llvm.org/D41976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D40023: [RISCV] Implement ABI lowering

2018-01-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. LGTM Not sure if anyone's mentioned it yet, but there's a C ABI testing tool in clang/utils/ABITest/ which you'll probably want to try at some point. Comment at: lib/CodeGen/TargetInfo.cpp:8913 + } + return getNatur

  1   2   >