HomePhabricator

[clang][Tooling] Prefer -x over -std when interpolating

Authored by kadircet on Dec 19 2019, 1:22 PM.

Description

[clang][Tooling] Prefer -x over -std when interpolating

Summary:
Currently interpolation logic prefers -std over -x. But the latter is a
more strong signal, so this patch inverts the order and only makes use of -std
if -x didn't exist.

Fixes https://github.com/clangd/clangd/issues/185

Thanks @sammccall for tracking this down!

Reviewers: sammccall

Subscribers: ilya-biryukov, usaxena95, cfe-commits, sammccall

Tags: #clang

Differential Revision: https://reviews.llvm.org/D71727

Details