D15764: [Custom-DefinesAndIncludes]: Objective-C++ support

Aaron Puchert noreply at phabricator.kde.org
Wed Sep 26 15:33:29 BST 2018


aaronpuchert added a comment.


  So I think there are two questions to decide here:
  
  - Do we want a `-std=` flag, does Clang even accept that?
  - Should we just take the `ObjC` flags from the `C` flags, and `ObjC++` flags from the `C++` flags, or should they be set independently?

INLINE COMMENTS

> gcclikecompiler.cpp:69
>      // no -std= flag passed -> assume c++11
> -    return QStringLiteral("-std=c++11");
> +    return (type == Utils::Cpp || type == Utils::ObjCpp) ? QStringLiteral("-std=c++11") : QStringLiteral("");
>  }

Does ObjC++ not have a `-std=` flag?

> settingsmanager.cpp:74-75
>          return QStringLiteral("parserArgumentsCuda");
> +    // TODO: is there a need for "parserArgumentsObjC[++]" and if so how/where
> +    // if not, merge the ObjC cases with the C/C++ cases.
>      case Utils::ObjC:

Do you want to be able to define custom parser arguments? As above, are there multiple standards or language versions of ObjC++? I'd guess so if it is based on C++.

> settingsmanager.cpp:108
> +    arguments[Utils::ObjC] = QStringLiteral("-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall");
> +    arguments[Utils::ObjCpp] = arguments[Utils::Cpp];
>      arguments.parseAmbiguousAsCPP = true;

Since we didn't copy the `C` string for `ObjC`, we should similarly not tie `Cpp` and `ObjCpp` together. Unless there is a good reason to do that. But then we should do the same for `C` and `ObjC`.

> parserwidget.cpp:61
> +    case Utils::ObjCpp:
> +        return QStringLiteral("c++11");
>      case Utils::Other:

So here you say `c++11`.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D15764

To: rjvbb, #kdevelop
Cc: aaronpuchert, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180926/10c7a579/attachment.html>


More information about the KDevelop-devel mailing list