[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-21 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. emilio added a project: clang-c. This allows us to see the default template parameters too. This is a regression in clang 4.0, so uplifting to a dot release would be neat (but not required, I guess). The regression was caused by https://reviews.llvm.org/D26663.

[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-21 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio updated this revision to Diff 96130. emilio added a comment. Full diff, thanks @arphaman :) https://reviews.llvm.org/D32348 Files: clang/test/Index/print-type.cpp clang/tools/libclang/CXType.cpp Index: clang/tools/libclang/CXType.cpp

[PATCH] D32389: [libclang] Expose some target information via the C API.

2017-04-22 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. emilio added a project: clang-c. This allows users to query the target triple and target pointer width, which would make me able to fix https://github.com/servo/rust-bindgen/issues/593 and other related bugs in an elegant way (without having to manually parse the

[PATCH] D32389: [libclang] Expose some target information via the C API.

2017-04-22 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. I'd appreciate if anyone could point me to an appropriate reviewer for this. Thanks in advance! :) Repository: rL LLVM https://reviews.llvm.org/D32389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-21 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added inline comments. Comment at: clang/test/Index/print-type.cpp:118 // CHECK: TemplateRef=Foo:4:8 [type=] [typekind=Invalid] [isPOD=0] -// CHECK: FieldDecl=qux:29:38 (Definition) [type=Qux] [typekind=Unexposed]

[PATCH] D32389: [libclang] Expose some target information via the C API.

2017-04-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio updated this revision to Diff 96652. emilio added a comment. Updated per comments, I used `clang_TargetInfo_dispose` following recent APIs instead of `clang_disposeTargetInfo`, let me know if I should change that. Also, didn't add a new header for `CXTargetInfo`, since it's rather small,

[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-26 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. In https://reviews.llvm.org/D32348#738704, @rsmith wrote: > This change looks like it introduces a regression itself: given > > template struct A {}; > template using B = A; > B bi; > > > ... requesting the template arguments for the type `B` changes from >

[PATCH] D32389: [libclang] Expose some target information via the C API.

2017-04-26 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio updated this revision to Diff 96834. emilio added a comment. Updated per review comments, thanks :) Repository: rL LLVM https://reviews.llvm.org/D32389 Files: clang/include/clang-c/Index.h clang/test/Index/target-info.c clang/tools/c-index-test/c-index-test.c

[PATCH] D32566: Revert rL301328 and add tests for the regressions introduced.

2017-04-26 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. emilio added a project: clang-c. See https://reviews.llvm.org/D32348#738704 Repository: rL LLVM https://reviews.llvm.org/D32566 Files: clang/test/Index/print-type.cpp clang/tools/libclang/CXType.cpp Index: clang/tools/libclang/CXType.cpp

[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-26 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. Revert + tests @ https://reviews.llvm.org/D32566 Repository: rL LLVM https://reviews.llvm.org/D32348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-26 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. > FWIW when I wrote https://reviews.llvm.org/D26663, I did it because arguments > weren't inspectionable at all for `using` declarations. Actually both of them > would've worked for me. Also, this bit was not completely accurate, and you could inspect ones, but not

[PATCH] D32566: Revert rL301328 and add tests for the regressions introduced.

2017-04-27 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. I'm personally fine with this behavior in particular, given you can check the cursor you're querying to know if it's a typedef or alias specialization. Of course I'm not the only one using libclang, though, so I'd be interested in hearing other people's opinion. I

[PATCH] D32389: [libclang] Expose some target information via the C API.

2017-04-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. Sounds good to me, will do :) Repository: rL LLVM https://reviews.llvm.org/D32389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32348: [libclang] Check for a record declaration before a template specialization.

2017-04-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. Yes, please! I've submitted a few patches, but still no commit access. Thanks! https://reviews.llvm.org/D32348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32389: [libclang] Expose some target information via the C API.

2017-04-28 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301648: [libclang] Expose some target information via the C API. (authored by emilio). Changed prior to commit: https://reviews.llvm.org/D32389?vs=96834=97109#toc Repository: rL LLVM

[PATCH] D32566: Revert rL301328 and add tests for the regressions introduced.

2017-05-02 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL301902: [libclang] Revert rL301328 and add tests for the regressions introduced. (authored by emilio). Changed prior to commit: https://reviews.llvm.org/D32566?vs=96838=97407#toc Repository: rL LLVM

[PATCH] D32566: Revert rL301328 and add tests for the regressions introduced.

2017-05-02 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. I sent http://lists.llvm.org/pipermail/cfe-dev/2017-May/053703.html Repository: rL LLVM https://reviews.llvm.org/D32566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D58570: [libclang] Expose warn_unused and warn_unused_result attributes.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC354824: [libclang] Expose warn_unused and warn_unused_result attributes. (authored by emilio, committed by ). Herald added a reviewer: serge-sans-paille. Changed prior to commit:

[PATCH] D58571: [libclang] Fix a trivial error introduced in D57946.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354823: [libclang] Fix a trivial error introduced in D57946. (authored by emilio, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio updated this revision to Diff 188254. emilio marked an inline comment as done. emilio added a comment. Add CHECK tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58569/new/ https://reviews.llvm.org/D58569 Files:

[PATCH] D58570: [libclang] Expose warn_unused and warn_unused_result attributes.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. Landed with that change, thanks for the review @anastasia! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58570/new/ https://reviews.llvm.org/D58570 ___ cfe-commits mailing list

[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio marked 2 inline comments as done. emilio added a comment. Huh, somehow forgot to press "Submit" this morning :) Comment at: clang/tools/c-index-test/c-index-test.c:1695 +CXType RT = clang_getResultType(T); +if (RT.kind != CXType_Invalid) +

[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-26 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. emilio marked an inline comment as done. Closed by commit rC354885: [libclang] Avoid crashing when getting layout info of an undeduced type. (authored by emilio, committed by ). Changed prior to commit:

[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-26 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. Thank you for all the reviews! :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58569/new/ https://reviews.llvm.org/D58569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D58571: [libclang] Fix a trivial error introduced in D57946.

2019-02-22 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. emilio added reviewers: Anastasia, arphaman. Herald added a reviewer: serge-sans-paille. Herald added a project: clang. Herald added a subscriber: cfe-commits. The value for CXCursor_ConvergentAttr is not 420. I'm not really sure how easy it is to test this, and I'm

[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-25 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio marked 2 inline comments as done. emilio added inline comments. Comment at: clang/tools/c-index-test/c-index-test.c:1695 +CXType RT = clang_getResultType(T); +if (RT.kind != CXType_Invalid) + PrintSingleTypeSize(RT, " [resulttype=%s] [resulttypekind=%s]",

[PATCH] D58570: [libclang] Expose warn_unused and warn_unused_result attributes.

2019-02-22 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. emilio added reviewers: arphaman, Anastasia. Herald added subscribers: cfe-commits, JDevlieghere. Herald added a project: clang. This is helpful to properly detect them, and fixing issues like https://github.com/rust-lang/rust-bindgen/issues/1518. Repository: rG

[PATCH] D58569: [libclang] Avoid crashing when getting layout info of an undeduced type.

2019-02-22 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang. When the type is not deducible, return an error instead of crashing. This fixes https://bugs.llvm.org/show_bug.cgi?id=40813. Repository: rG LLVM Github Monorepo

[PATCH] D59299: [libclang] Expose aligned() attribute.

2019-03-13 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. emilio added reviewers: Anastasia, arphaman. Herald added a reviewer: serge-sans-paille. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is useful because otherwise there's no easy way to distinguish #pragma packed(N) from

[PATCH] D59299: [libclang] Expose aligned() attribute.

2019-03-13 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. Thank you for the review! :) Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59299/new/ https://reviews.llvm.org/D59299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59299: [libclang] Expose aligned() attribute.

2019-03-13 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356062: [libclang] Expose aligned() attribute. (authored by emilio, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64409: [libclang] Fix hang in release / assertion in debug when evaluating value-dependent types.

2019-07-09 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. emilio added reviewers: Anastasia, arphaman. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. emilio edited the summary of this revision. Expression evaluator doesn't work in value-dependent types, so ensure that the precondition it

[PATCH] D64409: [libclang] Fix hang in release / assertion in debug when evaluating value-dependent types.

2019-07-09 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365490: [libclang] Fix hang in release / assertion in debug when evaluating value… (authored by emilio, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D64409: [libclang] Fix hang in release / assertion in debug when evaluating value-dependent types.

2019-07-09 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. Thanks for the review as always @Anastasia ^.^ Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64409/new/ https://reviews.llvm.org/D64409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D72742: Don't assume promotable integers are zero/sign-extended already in x86-64 ABI.

2020-02-03 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. Could anyone update me with how do they want me to proceed here? Is fixing the coercions enough to allow this to land? Do I need to make it target-specific? If so, which targets should keep the current behavior? Another slightly more backwards-compatible alternative

[PATCH] D72742: Don't assume promotable integers are zero/sign-extended already in x86-64 ABI.

2020-01-15 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. The relevant discussion is here . From the "Parameter Passing" section in https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf, there's no mention of sign-extension requirements for arguments. > The

[PATCH] D72742: Don't assume promotable integers are zero/sign-extended already in x86-64 ABI.

2020-01-15 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. In D72742#1822554 , @rnk wrote: > +@chandlerc @rjmccall > > Didn't we work this out already when John added the alignment tracking stuff? > I remember this bug involving libjpegturbo standalone assembly receiving a > 32-bit

[PATCH] D72742: Don't assume promotable integers are zero/sign-extended already in x86-64 ABI.

2020-01-14 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. Herald added a reviewer: jdoerfert. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Sign-extension is not guaranteed by the ABI, and thus the callee cannot assume it. This fixes PR44228 and PR12207. With these changes, there

[PATCH] D140075: [libclang] Expose using shadow types and declarations in libclang.

2022-12-16 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio updated this revision to Diff 483499. emilio added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140075/new/ https://reviews.llvm.org/D140075 Files: clang/include/clang-c/Index.h clang/lib/Sema/SemaCodeComplete.cpp

[PATCH] D140074: [libclang] Remove redundant return statements in CXType.cpp

2022-12-14 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio updated this revision to Diff 483048. emilio added a comment. Remove gratuitious whitespace changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140074/new/ https://reviews.llvm.org/D140074 Files: clang/tools/libclang/CXType.cpp

[PATCH] D140074: [libclang] Remove redundant return statements in CXType.cpp

2022-12-14 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a reviewer: aaron.ballman. emilio added a comment. Unclear to me who to request review from, so I'm peeking reviewer based on the git log. Please feel free to review or forward to someone else as appropriate. Thanks in advance! Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D140075: [libclang] Expose using shadow types and declarations in libclang.

2022-12-14 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. Herald added subscribers: arphaman, JDevlieghere. Herald added a project: All. emilio requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This allows tools like rust-bindgen to detect typedefs properly. See

[PATCH] D140075: [libclang] Expose using shadow types and declarations in libclang.

2022-12-14 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a reviewer: aaron.ballman. emilio added a comment. (As in my previous commit, peeking based on git log, please review / forward as appropriate. Thanks again!) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140075/new/

[PATCH] D140074: [libclang] Remove redundant return statements in CXType.cpp

2022-12-14 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio created this revision. Herald added a project: All. emilio requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Let the branch fall through the error path like other functions here do. Repository: rG LLVM Github Monorepo

[PATCH] D140074: [libclang] Remove redundant return statements in CXType.cpp

2023-02-28 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio updated this revision to Diff 501269. emilio added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140074/new/ https://reviews.llvm.org/D140074 Files: clang/tools/libclang/CXType.cpp Index:

[PATCH] D140075: [libclang] Expose using shadow types and declarations in libclang.

2023-02-28 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio updated this revision to Diff 501270. emilio added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140075/new/ https://reviews.llvm.org/D140075 Files: clang/include/clang-c/Index.h clang/lib/Sema/SemaCodeComplete.cpp

[PATCH] D140074: [libclang] Remove redundant return statements in CXType.cpp

2023-02-28 Thread Emilio Cobos Álvarez via Phabricator via cfe-commits
emilio added a comment. In D140074#4159583 , @serge-sans-paille wrote: > The cleanup looks good to me, thanks! Out of curiosity, did just stumble on > this, or did an automatic tool gave you an hint? I was just reading through the code. Repository: