This revision was automatically updated to reflect the committed changes.
martong marked an inline comment as done.
Closed by commit rC355096: [CTU] Do not allow different CPP dialects in CTU
(authored by martong, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D57906?vs=18592
xazax.hun accepted this revision.
xazax.hun added a comment.
This revision is now accepted and ready to land.
LGTM! I think we should commit this as is for now but maybe adding a TODO
comment to summarize the problem would be nice. Maybe we could have an
isSameDialect or similar method within La
martong marked 2 inline comments as done.
martong added inline comments.
Comment at: lib/CrossTU/CrossTranslationUnit.cpp:255
+ // in the other unit it has none.
+ if (LangTo.CPlusPlus11 != LangFrom.CPlusPlus11 ||
+ LangTo.CPlusPlus14 != LangFrom.CPlusPlus14 ||
---
martong added a comment.
> How is #if __cplusplus >= 201103L qualitatively different from #ifndef NDEBUG
> or #if MYLIB_ABI_VERSION==2 or #if __DATE__ == "2018-04-01"?
Ideally, all macros should be the same in the two TUs... If we were very strict
then we could check for that, but that might be
r.stahl added inline comments.
Comment at: lib/CrossTU/CrossTranslationUnit.cpp:255
+ // in the other unit it has none.
+ if (LangTo.CPlusPlus11 != LangFrom.CPlusPlus11 ||
+ LangTo.CPlusPlus14 != LangFrom.CPlusPlus14 ||
This is likely to become a bug in th
Quuxplusone added a comment.
> Consider this STL code:
>
> template
> struct __alloc_traits
> #if __cplusplus >= 201103L
> : std::allocator_traits<_Alloc>
> #endif
> { // ...
> };
>
>
> This class template would create ODR errors during merging the two units,
> since in o
martong added inline comments.
Comment at: lib/CrossTU/CrossTranslationUnit.cpp:232
+
+ // We do not support CTU across languages (C vs C++).
if (LangTo.CPlusPlus != LangFrom.CPlusPlus) {
a_sidorin wrote:
> The comment change looks strange.
Ok, I reverted thi
martong updated this revision to Diff 185926.
martong marked 4 inline comments as done.
martong added a comment.
- Revert comment change
- Add lang_dialect_mismatch and stats for that
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57906/new/
https://reviews.llvm.o
a_sidorin added a comment.
Hi Gabor,
Please find my comments inline.
Comment at: lib/CrossTU/CrossTranslationUnit.cpp:232
+
+ // We do not support CTU across languages (C vs C++).
if (LangTo.CPlusPlus != LangFrom.CPlusPlus) {
The comment change looks strang
martong created this revision.
martong added reviewers: xazax.hun, a_sidorin, r.stahl.
Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs.
Herald added a project: clang.
If CPP dialects are different then return with error.
Consider this STL code:
template
struct
10 matches
Mail list logo