<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Ijaz,</p>
<p>a SourceLocation object points to a specific location inside a
buffer. The line and column information is derived from that via
the SourceManager. The locations are immutable, but you can create
a modified copy with SourceLocation::getLocWithOffset.</p>
<p>I'm not familiar with a direct way to change the line number, but
maybe you can figure out an appropriate method for your use-case
with the helpers in the Preprocessor or Lexer classes (e.g.
advance to next token).<br>
</p>
<p>-Rafael<br>
</p>
<div class="moz-cite-prefix">On 27.10.19 06:07, Ijaz Ahmed via
cfe-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+uYrcNRxXMG0NSDtoDSz036Dope3r88Rh7J-RoBiWxuyU9MHg@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div dir="ltr">Dear All,
<div><br>
</div>
<div>Let suppose, I have a object "startLoc" of class
"SourceLocation". The object contains line and column number
information. How can I modify the line number in startLoc
object? I was expecting "set()" kind of methods for
class SourceLocation, but I could not find any. I would be
thankful for your help.<br>
<br>
Regards<br>
Ijaz<br>
<br>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
</body>
</html>