summaryrefslogtreecommitdiffstats
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2018-09-19 14:59:35 +0200
committerIvan Donchevskii <ivan.donchevskii@qt.io>2018-09-21 12:12:57 +0000
commit1c67a96b2b8aee8b1624cd32fad74e0ccff473df (patch)
tree09f6e95d476f67d29a3c9c0cf83084ea98a08804 /lib/Parse/ParseExpr.cpp
parent5d08e4bd09e184ec138fad141ca1fb2bca9e5091 (diff)
[backported/clang-8][CodeComplete] Generate completion fix-its for C code as wellrelease_60-based
-------------------------------------------------------------------------- * https://reviews.llvm.org/D52261 -------------------------------------------------------------------------- Current completion fix-its approach does not provide OtherOpBase for C code. But we can easily proceed in this case taking the original Base type. Task-number: QTCREATORBUG-21104 Change-Id: I11d8bc417480a50291a07267ece9ff3a071961f0 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index cb28fcf9bd..be858a7023 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -1728,6 +1728,8 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) {
Expr *Base = LHS.get();
Expr *CorrectedBase = CorrectedLHS.get();
+ if (!CorrectedBase && !getLangOpts().CPlusPlus)
+ CorrectedBase = Base;
// Code completion for a member access expression.
Actions.CodeCompleteMemberReferenceExpr(