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

2017-07-24 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Strahinja, Does GCC already has a similar option? If so, does this share the same name? https://reviews.llvm.org/D34878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34030: Fix the postorder visting of the ClassTemplateSpecializationDecl nodes in the RecursiveASTVisitor.

2017-07-24 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Peter, Please add a testcase for this change, it also seems that you should update the comment. https://reviews.llvm.org/D34030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34030: Fix the postorder visting of the ClassTemplateSpecializationDecl nodes in the RecursiveASTVisitor.

2017-07-27 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. In https://reviews.llvm.org/D34030#821282, @MontyKutyi wrote: > Added test for the fix. Great! The test code you added doesn't seem to be compatible with clang style, can you run clang format and update the test? https://reviews.llvm.org/D34030

[PATCH] D34788: [ASTReader] Add test for previous change r306583 / 145692e.

2017-06-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM! Thanks Graydon https://reviews.llvm.org/D34788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31778: [Modules] Implement ODR-like semantics for tag types in C/ObjC

2017-06-30 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 104881. bruno added a comment. > Digging into this a bit more, I think the root of the problem is that the > `ND->isExternallyVisible()` call in > `LookupResult::isHiddenDeclarationVisible` is wrong. Redeclaration lookup > should never find hidden

[PATCH] D34510: Teach clang how to merge typedef over anonymous structs in C mode.

2017-06-30 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi @v.g.vassilev, sorry for the delay. Just updated https://reviews.llvm.org/D31778. I agree with Richard's observations, do you think you can extend it to work in the same way as https://reviews.llvm.org/D31778 does? The structural checking is already abstracted there

[PATCH] D34510: Teach clang how to merge typedef over anonymous structs in C mode.

2017-06-30 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Tested it locally, we actually need all these changes on top of https://reviews.llvm.org/D31778. LGTM Repository: rL LLVM https://reviews.llvm.org/D34510

[PATCH] D31778: [Modules] Implement ODR-like semantics for tag types in C/ObjC

2017-06-30 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306918: [Modules] Implement ODR-like semantics for tag types in C/ObjC (authored by bruno). Changed prior to commit: https://reviews.llvm.org/D31778?vs=104881=104965#toc Repository: rL LLVM

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2017-04-26 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks for your patience! LGTM with a minor comment below. Comment at: test/Sema/vector-gcc-compat.c:101 + + v2i64_r = v2i64_a && 1; // expected-error {{invalid vector

[PATCH] D31778: [Modules] Implement ODR-like semantics for tag types in C/ObjC

2017-04-26 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. @rsmith ping! https://reviews.llvm.org/D31778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32576: [Modules] Improve diagnostics for incomplete umbrella

2017-04-26 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. One of the -Wincomplete-umbrella warnings diagnoses when a header is present in the directory but it's not present in the umbrella header. Currently, this warning only happens on top level modules; any submodule using an umbrella header does not get this warning.

[PATCH] D28670: [ObjC] Disallow vector parameters and return values in Objective-C methods on older X86 targets

2017-04-26 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks Alex. LGTM Repository: rL LLVM https://reviews.llvm.org/D28670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32576: [Modules] Improve diagnostics for incomplete umbrella

2017-04-27 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301597: [Modules] Improve diagnostics for incomplete umbrella (authored by bruno). Changed prior to commit: https://reviews.llvm.org/D32576?vs=96857=97007#toc Repository: rL LLVM

[PATCH] D34030: Fix the postorder visting of the ClassTemplateSpecializationDecl nodes in the RecursiveASTVisitor.

2017-07-28 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Nice! One more comment: please also fix names of local variables, member variables and function parameters. See https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly. Yes, there is precedence for violations in other places in

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

2017-08-02 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/Driver/ToolChains/Arch/ARM.cpp:136 +if (ThreadPointer == ReadTPMode::Invalid && +!StringRef(A->getValue()).empty()) { + D.Diag(diag::err_drv_invalid_mtp) << A->getAsString(Args); What happens if you

[PATCH] D32828: [Modules] Fix conservative assertion for import diagnostics

2017-05-03 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. We currenltly assert when want to diagnose a missing import and the decl in question is already visible. It turns out that the decl in question might be visible because another decl from the same module actually made the module visible in a previous error

[PATCH] D28832: Improve redefinition errors pointing to the same header.

2017-05-11 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL302765: [Sema] Improve redefinition errors pointing to the same header (authored by bruno). Changed prior to commit: https://reviews.llvm.org/D28832?vs=95369=98584#toc Repository: rL LLVM

[PATCH] D32981: [ASTImporter] Improve handling of incomplete types

2017-05-10 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. Hi Sean, LGTM! One comment below. Comment at: tools/clang-import-test/clang-import-test.cpp:263 +AddExternalSource(*CI, Imports); + } No need for the curly braces here

[PATCH] D33275: Keep into account if files were virtual.

2017-05-17 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Vassil, In which case specifically this trigger for you? I'm curious because we're sometimes hitting non-deterministic crashes in ComputeLineNumbers, wonder if it's related. Any chance you can come up with a testcase? https://reviews.llvm.org/D33275

[PATCH] D34377: Support MS builtins using 'long' on LP64

2017-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 103315. bruno marked an inline comment as done. bruno added a comment. Addressing comments! https://reviews.llvm.org/D34377 Files: include/clang/Basic/Builtins.def include/clang/Basic/BuiltinsARM.def include/clang/Basic/BuiltinsX86.def

[PATCH] D34377: Support MS builtins using 'long' on LP64

2017-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked 3 inline comments as done. bruno added inline comments. Comment at: test/CodeGen/ms-intrinsics-darwin.c:1 +// RUN: %clang_cc1 -ffreestanding -fms-extensions \ +// RUN: -triple x86_64--darwin -Oz -emit-llvm %s -o - \ rnk wrote: > I'd rather

[PATCH] D34377: Support MS builtins using 'long' on LP64

2017-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 103287. bruno retitled this revision from "Support MS builtins using 'long' on Darwin/LP64" to "Support MS builtins using 'long' on LP64". bruno edited the summary of this revision. bruno added a comment. New patch addressing comments from reviewers.

[PATCH] D34377: Support MS builtins using 'long' on LP64

2017-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305875: Support MS builtins using 'long' on LP64 platforms (authored by bruno). Changed prior to commit: https://reviews.llvm.org/D34377?vs=103315=103318#toc Repository: rL LLVM

[PATCH] D34377: Support MS builtins using 'long' on Darwin/LP64

2017-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/AST/ASTContext.cpp:8551 + break; +} case 'W': majnemer wrote: > bruno wrote: > > bruno wrote: > > > rnk wrote: > > > > compnerd wrote: > > > > > I agree with @majnemer. Why not base this on the

[PATCH] D34377: Support MS builtins using 'long' on Darwin/LP64

2017-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/AST/ASTContext.cpp:8551 + break; +} case 'W': bruno wrote: > rnk wrote: > > majnemer wrote: > > > bruno wrote: > > > > bruno wrote: > > > > > rnk wrote: > > > > > > compnerd wrote: > > > > > > > I agree

[PATCH] D34377: Support MS builtins using 'long' on Darwin/LP64

2017-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: include/clang/Basic/Builtins.def:55 // W -> int64_t +// l -> 'int' if builtin is a MS extensions and the target is Darwin/LP64. +// Defaults to 'L' otherwise. rnk wrote: > majnemer wrote: > > Why not just

[PATCH] D34469: Use vfs::FileSystem in ASTUnit when creating CompilerInvocation.

2017-06-22 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a reviewer: bruno. bruno added a comment. Any reason why this doesn't contain a testcase? https://reviews.llvm.org/D34469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34588: Check for _MSC_VER before define _LIBCPP_MSVCRT

2017-06-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. _LIBCPP_MSVCRT is defined because _WIN32 is defined and __MINGW32__ is not. Some non-windows targets using MS extensions define _WIN32 for compatibility with Windows but do not have MSVC compatibility. This patch is an attempt to do not have _LIBCPP_MSVCRT defined

[PATCH] D34588: Check for _MSC_VER before define _LIBCPP_MSVCRT

2017-06-26 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 103975. bruno added a comment. Update patch after reviewer suggestions! https://reviews.llvm.org/D34588 Files: include/__config Index: include/__config === --- include/__config +++

[PATCH] D34588: Check for _MSC_VER before define _LIBCPP_MSVCRT

2017-06-26 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked an inline comment as done. bruno added inline comments. Comment at: include/__config:234-235 +// a MS compatibility version is specified. # ifndef __MINGW32__ -#define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library +#ifdef _MSC_VER +# define

[PATCH] D33357: Avoid calling report_fatal_error in the destructor of raw_fd_ostream when saving a module timestamp file

2017-05-24 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Makes sense. LGTM! Repository: rL LLVM https://reviews.llvm.org/D33357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31778: [Modules] Implement ODR-like semantics for tag types in C/ObjC

2017-05-19 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 99585. bruno added a comment. Update the patch to address @rsmith comments and rebase https://reviews.llvm.org/D31778 Files: include/clang/AST/ASTStructuralEquivalence.h include/clang/Basic/DiagnosticASTKinds.td include/clang/Parse/Parser.h

[PATCH] D31778: [Modules] Implement ODR-like semantics for tag types in C/ObjC

2017-05-19 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked 3 inline comments as done. bruno added a comment. > I think the problem is that we don't take module visibility into account when > doing redefinition checking for enumerators. Instead of passing through this > flag, we should probably just ignore hidden declarations when checking

[PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-01 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a reviewer: bruno. bruno added a comment. Hi Aaron, Nice catch! Any chance you can add a testcase to this? https://reviews.llvm.org/D33788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-06-01 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Sjoerd, Thanks for working on this. Can you add context to your patch? Comment at: test/CodeGenCXX/float16-declarations-error.cpp:1 +// RUN: not %clang -S -emit-llvm --target=aarch64 %s -o - 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR +

[PATCH] D33703: Support lazy stat'ing of files referenced by module maps

2017-06-01 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D33703 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33703: Support lazy stat'ing of files referenced by module maps

2017-06-01 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Richard, Thanks for improving this further! Questions / comments: - I've noticed in the patch that on the ASTWriter side we serialize the introduced size / mtime, but there are no changes to the ASTReader, so I assume in the reader side you still need the module map

[PATCH] D32520: Support __fp16 vectors

2017-06-01 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Akira, This is nice, thanks for doing it! Comment at: include/clang/Sema/Sema.h:9270 + QualType RHSType, + bool CompAssign = false); Can

[PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > I'm unaware of any other API that canonicalizes the path, which is what users > of this API are going to expect. You can also call `sys::path::remove_dots(Path, /*remove_dot_dot=*/true);` > There's already a test case that covers this: Index/pch-from-libclang.c -- it

[PATCH] D33788: Return a canonical path from getClangResourcePath()

2017-06-02 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. > Yes, but that does not canonicalize the path. For instance, it won't handle > doubled-up slashes or symlinks. Right. > Ultimately, the value returned from this API gets passed to POSIX

[PATCH] D33732: Catch invalid bitwise operation on vector of floats

2017-06-02 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi, Comment at: test/Sema/types.c:92 + +typedef float __attribute__((ext_vector_type(4))) float4; +float4 test3(float4 x) { Can you also add a test for the `vector_type` variant? It might be more appropriate to put this at

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

2017-06-06 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > About the tests and using --target=aarch64: you're right that there should > nothing be ARM specific here, but it is just that for Aarch64 it will show > "half" IR types which I preferred, while it looks like x86 way of dealing > with is to convert it and work on i16

[PATCH] D33732: Catch invalid bitwise operation on vector of floats

2017-06-06 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM Comment at: test/Sema/ext_vector_ops.c:22 + int array2[17]; + // FIXME: error message below needs type! + (void)(array2[v2ua]); // expected-error{{array subscript is

[PATCH] D32520: Support __fp16 vectors

2017-09-19 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1042 +} + +assert(SrcElementTy->isFloatingPointTy() && What happens if the SrcElementTy is float and DstElementTy isn't? Seems like it will hit the assertion below.

[PATCH] D32520: Support __fp16 vectors

2017-09-22 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks Akira. https://reviews.llvm.org/D32520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-09-22 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Boris, This is a handy option, very nice. Can you also add testcases? Comment at: lib/Frontend/CompilerInvocation.cpp:1561 + + auto Buf = FileMgr.getBufferForFile(File); + if (!Buf) { `auto Buf` -> `auto *Buf`

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-12 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. Herald added a subscriber: yaxunl. Change behavior introduced in r298369 and only error out on vector component invalid length access on OpenCL mode. https://reviews.llvm.org/D38868 Files: lib/Sema/SemaExprMember.cpp test/SemaOpenCL/vector_swizzle_length.cl

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked 2 inline comments as done. bruno added inline comments. Comment at: test/SemaOpenCL/vector_swizzle_length.cl:7 void foo() { -float8 f2 = (float8)(0, 0, 0, 0, 0, 0, 0, 0); +float8 f2 = (float8){0, 0, 0, 0, 0, 0, 0, 0}; Anastasia wrote: >

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 118966. bruno marked 2 inline comments as done. bruno added a comment. Update patch after Anastasia's suggestions https://reviews.llvm.org/D38868 Files: lib/Sema/SemaExprMember.cpp test/Sema/vector_swizzle_length.c

[PATCH] D38208: Add support for remembering origins to ExternalASTMerger

2017-09-27 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D38208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D38364: Fix Modules/builtin-import.mm to be able to handle non-Darwin targets

2017-09-28 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks Filipe, LGTM https://reviews.llvm.org/D38364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36589: Add support for remembering origins to ExternalASTMerger

2017-09-25 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Thanks for the additional docs! More comments below. Comment at: lib/AST/ExternalASTMerger.cpp:116 +if (auto *ToDC = dyn_cast(To)) { + logs() << "(ExternalASTMerger*)" << (void*) + << " imported (DeclContext*)" << (void*)ToDC

[PATCH] D38208: Add support for remembering origins to ExternalASTMerger

2017-09-25 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/AST/ExternalASTMerger.cpp:79 + return cast(SearchResultDecl)->getPrimaryContext(); +else + return nullptr; // This type of lookup is unsupported No need for `else` here. Comment at:

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-17 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316016: [OpenCL] Restrict swizzle length check to OpenCL mode (authored by bruno). Changed prior to commit: https://reviews.llvm.org/D38868?vs=118966=119351#toc Repository: rL LLVM

[PATCH] D40112: [CodeGen][X86] Fix handling of __fp16 vectors

2017-11-27 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:954 if (DstTy->isFloatingPointTy()) { - if (!CGF.getContext().getLangOpts().HalfArgsAndReturns) + if (CGF.getContext().getTargetInfo().useFP16ConversionIntrinsics()) return

[PATCH] D40112: [CodeGen][X86] Fix handling of __fp16 vectors

2017-12-04 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM with the minor comment below. Comment at: include/clang/Basic/TargetInfo.h:563 + /// Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used + /// to

[PATCH] D40983: Generate Libclang invocation reproducers using a new -cc1gen-reproducer option

2017-12-18 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Alex, Thanks for improving this. - Instead of adding `-cc1gen-reproducer`, why can't you run that through `-cc1` and have a flag similar to `-###`, which just prints the reproducer line? - I didn't understand how you can use the final output information, can you

[PATCH] D33275: Keep into account if files were virtual.

2017-11-14 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping! https://reviews.llvm.org/D33275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-04 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added a reviewer: rsmith. Herald added a subscriber: mgorny. Header maps are binary files used by Xcode, which are used to map header names or paths to other locations. Clang has support for those since its inception, but there's not a lot of header map testing

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-14 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D46485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-09 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping! Repository: rC Clang https://reviews.llvm.org/D46485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-15 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. @jkorous, thanks for taking a look. This is an old python script which I haven't touched before, maybe there were answers to your questions but they are now lost in time. I'll address the review though and upload a new version. Repository: rC Clang

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 147829. bruno added a comment. Update testcases (and fixed a missing one) after Duncan's review. https://reviews.llvm.org/D46485 Files: CMakeLists.txt test/CMakeLists.txt test/Modules/crash-vfs-headermaps.m

[PATCH] D47118: [modules] Print input files when -module-file-info file switch is passed.

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Thanks for improving this Vassil. Where does in the output it shows up? I wonder if we should have those at the end given the huge amount of headers some modules might have. Repository: rC Clang https://reviews.llvm.org/D47118

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Depends on https://reviews.llvm.org/D46485 Repository: rC Clang https://reviews.llvm.org/D47157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: dexonsmith, ributzka, steven_wu. Introduce -Wquoted-include-in-framework-header, which should fire a warning whenever a quote include appears in a framework header, example, for A.h added in the tests: ... A.framework/Headers/A.h:2:10: warning:

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > See also PR22165. Nice, seems related to this indeed. Are you aware of any development along those lines in clang-tidy? We would like this to be part of clang and be used as part of the normal compiler workflow, it can surely be as well part of any clang-tidy

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-21 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 147901. bruno added a comment. Remove more outdated comments https://reviews.llvm.org/D46485 Files: CMakeLists.txt test/CMakeLists.txt test/Modules/crash-vfs-headermaps.m test/Preprocessor/Inputs/headermap-rel/foo.hmap

[PATCH] D47297: [Modules][ObjC] Add protocol redefinition to the current scope/context

2018-05-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added a reviewer: rsmith. Not doing so causes the AST writter to assert since the decl in question never gets emitted. This is fine when modules is not used, but otherwise we need to serialize something other than garbage. rdar://problem/39844933

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Eugene, > You could just not include new warning into -Wall and -Wextra. Those who will > want to check #include statements correctness could enable it explicitly. This is exactly what's happening in the patch, the new warning isn't part of `-Wall` or `-Wextra`, and

[PATCH] D47301: Warning for framework include violation from Headers to PrivateHeaders

2018-05-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: ributzka, vsapsai, dexonsmith. Framework vendors usually layout their framework headers in the following way: Foo.framework/Headers -> "public" headers Foo.framework/PrivateHeader -> "private" headers Since both headers in both directories

[PATCH] D47301: Warning for framework include violation from Headers to PrivateHeaders

2018-05-23 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 148317. bruno added a comment. Update to a more recent version of the patch. https://reviews.llvm.org/D47301 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticLexKinds.td lib/Lex/HeaderSearch.cpp

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-15 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked an inline comment as done. bruno added inline comments. Comment at: utils/hmaptool/hmaptool:55 +# The number of buckets must be a power of two. +if num_buckets == 0 or (num_buckets & num_buckets - 1) != 0: +raise

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-15 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 146992. bruno added a comment. Update after Jan review. https://reviews.llvm.org/D46485 Files: CMakeLists.txt test/CMakeLists.txt test/Preprocessor/Inputs/headermap-rel/foo.hmap test/Preprocessor/Inputs/headermap-rel/foo.hmap.json

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-18 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: test/Preprocessor/headermap-rel.c:2-3 // This uses a headermap with this entry: // Foo.h -> Foo/Foo.h dexonsmith wrote: > Should we delete this comment now that the header map is human-readable? Sure!

[PATCH] D48297: [Darwin] Add a warning for missing include path for libstdc++

2018-06-18 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/Frontend/InitHeaderSearch.cpp:491 } else { - AddDefaultCPlusPlusIncludePaths(triple, HSOpts); + AddDefaultCPlusPlusIncludePaths(Lang, triple, HSOpts); } If we happen to suggest libc++, but it's

[PATCH] D48297: [Darwin] Add a warning for missing include path for libstdc++

2018-06-19 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D48297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-30 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a subscriber: arphaman. bruno added inline comments. Comment at: lib/Lex/HeaderSearch.cpp:753-754 + IncluderAndDir.second->getName())) +Diags.Report(IncludeLoc, + diag::warn_quoted_include_in_framework_header) +

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-30 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: include/clang/Basic/DiagnosticLexKinds.td:713 +def warn_quoted_include_in_framework_header : Warning< + "double-quoted include \"%0\" in framework header, expected system style include" + >, InGroup, DefaultIgnore;

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-30 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: include/clang/Basic/DiagnosticLexKinds.td:713 +def warn_quoted_include_in_framework_header : Warning< + "double-quoted include \"%0\" in framework header, expected system style include" + >, InGroup, DefaultIgnore;

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > Consistency would be nice, but at the same time, I don't see a good metric > for when we'd know it's time to switch it to being on by default. I'm worried > that it'll remain off by default forever simply because no one thinks to go > turn it on (because it's silent

[PATCH] D45012: [Modules] Skip adding unused module maps to the dependency file

2018-05-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping Repository: rC Clang https://reviews.llvm.org/D45012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping! https://reviews.llvm.org/D46485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-31 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 149313. bruno added a comment. Updated the patch after Duncan and Aaron reviews. I actually went a bit more aggressive with the fixits, since I realized the conditions for the warning are already strict enough and we should take the chance to be more clear.

[PATCH] D46485: Add python tool to dump and construct header maps

2018-05-31 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping. Without this patch, we would have to add binary header maps for tests in https://reviews.llvm.org/D47157 and https://reviews.llvm.org/D47301, which I would like to avoid. https://reviews.llvm.org/D46485 ___

[PATCH] D47301: Warning for framework include violation from Headers to PrivateHeaders

2018-05-31 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 149361. bruno added a comment. Update patch after changes to https://reviews.llvm.org/D47157. Also address some of Volodymyr feedback. https://reviews.llvm.org/D47301 Files: include/clang/Basic/DiagnosticGroups.td

[PATCH] D47301: Warning for framework include violation from Headers to PrivateHeaders

2018-05-31 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked an inline comment as done. bruno added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:34-35 def AutoImport : DiagGroup<"auto-import">; def FrameworkHdrQuotedInclude : DiagGroup<"quoted-include-in-framework-header">; +def

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-31 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 149359. bruno edited the summary of this revision. bruno added a comment. Update after Duncan's review: remove header name from the warning message (since it's already in the fixit) https://reviews.llvm.org/D47157 Files:

[PATCH] D47157: Warning for framework headers using double quote includes

2018-05-31 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: test/Modules/double-quotes.m:24-25 + +// The same warnings show up when modules is on but -verify doesn't get it +// because they only show up under the module A building context. +// RUN: FileCheck --input-file=%t/stderr %s

[PATCH] D47297: [Modules][ObjC] Add protocol redefinition to the current scope/context

2018-06-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Herald added a subscriber: dexonsmith. Ping! Repository: rC Clang https://reviews.llvm.org/D47297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47297: [Modules][ObjC] Add protocol redefinition to the current scope/context

2018-06-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/Sema/SemaDeclObjC.cpp:1208 +// serialize something meaningful. +if (getLangOpts().Modules) + PushOnScopeChains(PDecl, TUScope); arphaman wrote: > Is this a problem only for modules or does this show up in

[PATCH] D47297: [Modules][ObjC] Add protocol redefinition to the current scope/context

2018-06-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC336031: Add protocol redefinition to the current scope/context (authored by bruno, committed by ). Repository: rL LLVM https://reviews.llvm.org/D47297 Files: lib/Sema/SemaDeclObjC.cpp

[PATCH] D47297: [Modules][ObjC] Add protocol redefinition to the current scope/context

2018-06-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336031: Add protocol redefinition to the current scope/context (authored by bruno, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D48685: [PCH+Modules] Load -fmodule-map-file content before including PCHs

2018-06-27 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: rsmith, benlangmuir. Consider: 1. Generate PCH with -fmodules and -fmodule-map-file 2. Use PCH with -fmodules and the same -fmodule-map-file If we don't load -fmodule-map-file content before including PCHs, the modules that are dependencies

[PATCH] D47301: Warning for framework include violation from Headers to PrivateHeaders

2018-06-22 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Ping! https://reviews.llvm.org/D47301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47301: Warning for framework include violation from Headers to PrivateHeaders

2018-06-25 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno closed this revision. bruno added a comment. Committed r335542 https://reviews.llvm.org/D47301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48367: [modules] Fix 37878; Autoload subdirectory modulemaps with specific LangOpts

2018-06-25 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:285 // directory. -loadSubdirectoryModuleMaps(SearchDirs[Idx]); +if (ModMap.getLangOpts().ObjC1 || ModMap.getLangOpts().ObjC2) + loadSubdirectoryModuleMaps(SearchDirs[Idx]);

[PATCH] D46485: Add python tool to dump and construct header maps

2018-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 152142. bruno added a comment. Update after Richard's review, fix python3 compatibility and check for zero sized string table https://reviews.llvm.org/D46485 Files: CMakeLists.txt test/CMakeLists.txt test/Modules/crash-vfs-headermaps.m

[PATCH] D47157: Warning for framework headers using double quote includes

2018-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335184: Warning for framework headers using double quote includes (authored by bruno, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D46485: Add python tool to dump and construct header maps

2018-06-20 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC335177: Add python tool to dump and construct header maps (authored by bruno, committed by ). Changed prior to commit: https://reviews.llvm.org/D46485?vs=152142=152168#toc Repository: rC Clang

<    1   2   3   4   5   >